Update of /cvsroot/synedit/SynEdit/Source
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28520
Modified Files:
Tag: Unicode_2004_08_31
SynUnicode.pas
Log Message:
Set SaveFormat instead of SaveUnicode, since SaveFormat is more precise and SaveUnicode returns if SaveFormat is a Unicode-Format.
Index: SynUnicode.pas
===================================================================
RCS file: /cvsroot/synedit/SynEdit/Source/Attic/SynUnicode.pas,v
retrieving revision 1.1.2.43
retrieving revision 1.1.2.44
diff -u -d -r1.1.2.43 -r1.1.2.44
--- SynUnicode.pas 3 Oct 2008 18:50:12 -0000 1.1.2.43
+++ SynUnicode.pas 5 Oct 2008 19:51:53 -0000 1.1.2.44
@@ -3150,7 +3150,7 @@
UnicodeStrings.Text := UTF8ToUnicodeString(UTF8Str);
{$ELSE}
UnicodeStrings.Text := UTF8Decode(UTF8Str);
- UnicodeStrings.SaveUnicode := True;
+ UnicodeStrings.SaveFormat := sfUTF8;
{$ENDIF}
end;
seUTF16LE:
@@ -3159,7 +3159,7 @@
Stream.ReadBuffer(WideStr[1], Size);
UnicodeStrings.Text := WideStr;
{$IFNDEF UNICODE}
- UnicodeStrings.SaveUnicode := True;
+ UnicodeStrings.SaveFormat := sfUTF16LSB;
{$ENDIF}
end;
seUTF16BE:
@@ -3169,7 +3169,7 @@
StrSwapByteOrder(PWideChar(WideStr));
UnicodeStrings.Text := WideStr;
{$IFNDEF UNICODE}
- UnicodeStrings.SaveUnicode := True;
+ UnicodeStrings.SaveFormat := sfUTF16MSB;
{$ENDIF}
end;
seAnsi:
@@ -3178,7 +3178,7 @@
Stream.ReadBuffer(AnsiStr[1], Size);
UnicodeStrings.Text := UnicodeString(AnsiStr);
{$IFNDEF UNICODE}
- UnicodeStrings.SaveUnicode := False;
+ UnicodeStrings.SaveFormat := sfAnsi;
{$ENDIF}
end;
end;
|