6. Februar 2014 14:21
CLEAR(noteLoc);
noteLoc.ADDTEXT(textPar);
IF noteLoc.LENGTH <= 255 THEN BEGIN
char1Loc := noteLoc.LENGTH;
textToWriteLoc.ADDTEXT(FORMAT(char1Loc));
END ELSE BEGIN
char1Loc := 128 + (noteLoc.LENGTH - 256) MOD 128;
char2Loc := 2 + (noteLoc.LENGTH - 256) DIV 128;
textToWriteLoc.ADDTEXT(FORMAT(char1Loc) + FORMAT(char2Loc));
END;
textToWriteLoc.ADDTEXT(noteLoc);
IF COPYSTR(userIDPar, STRLEN(userIDPar)) = ',' THEN
userIDPar := COPYSTR(userIDPar, 1, STRLEN(userIDPar) - 1);
newIDLoc := recRefVar.ADDLINK(
'dynamicsnav://///runpage?page=' + FORMAT(pageIDPar) +
'&bookmark=' + FORMAT(recRefVar.RECORDID, 0, 10) +
'&mode=view', recRefVar.NAME);
recordLinkLoc.GET(newIDLoc);
recordLinkLoc.CALCFIELDS(Note);
recordLinkLoc.Note.CREATEOUTSTREAM(oStreamLoc);
encodingLoc := Encodingloc.GetEncoding(437);
binaryWriterLoc := binaryWriterLoc.BinaryWriter(oStreamLoc,Encodingloc);
binaryWriterLoc.Write(FORMAT(noteLoc));
oStreamLoc := binaryWriterLoc.BaseStream;
recordLinkLoc.Type := recordLinkLoc.Type::Note;
recordLinkLoc.Notify := notifyPar;
recordLinkLoc."To User ID" := userIDPar;
recordLinkLoc."User ID" := LOWERCASE(recordLinkLoc."User ID");
recordLinkLoc.MODIFY;
EXIT(recordLinkLoc."Link ID");
6. Februar 2014 17:24
7. Februar 2014 09:08
7. Februar 2014 09:51
streamWriter DotNet System.IO.StreamWriter.'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
encoding DotNet System.Text.Encoding.'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
myFile File
MyOutStream OutStream
myFile.CREATE('Test.txt');
myFile.TEXTMODE(TRUE);
myFile.CREATEOUTSTREAM(MyOutStream);
streamWriter := streamWriter.StreamWriter(MyOutStream, encoding.Unicode);
7. Februar 2014 11:06
7. Februar 2014 12:04
14. Februar 2014 14:54
17. Februar 2014 11:20
encodingLoc := Encodingloc.GetEncoding(437);
binaryWriterLoc := binaryWriterLoc.BinaryWriter(oStreamLoc,Encodingloc);
//encodingLoc := Encodingloc.GetEncoding(437); <---Löschen
binaryWriterLoc := binaryWriterLoc.BinaryWriter(oStreamLoc,Encodingloc.UTF8());
17. Februar 2014 19:45
MichaelK hat geschrieben:Microsoft hat mir da auf die Sprünge geholfen.Richtig ist:
- Code:
encodingLoc := Encodingloc.GetEncoding(437);
binaryWriterLoc := binaryWriterLoc.BinaryWriter(oStreamLoc,Encodingloc);
- Code:
//encodingLoc := Encodingloc.GetEncoding(437); <---Löschen
binaryWriterLoc := binaryWriterLoc.BinaryWriter(oStreamLoc,Encodingloc.UTF8());
18. Februar 2014 09:25
20. Februar 2014 09:13