mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 21:19:31 +02:00
* the code page of unicodestring/widestring on big endian targets is
UTF-16BE, not UTF-16LE git-svn-id: trunk@21255 -
This commit is contained in:
parent
67ab61dcc8
commit
ab914a8ae3
@ -104,7 +104,8 @@ interface
|
||||
{$endif FPC_LITTLE_ENDIAN}
|
||||
{$endif}
|
||||
CP_UTF8 = 65001;
|
||||
CP_UTF16 = 1200;
|
||||
CP_UTF16LE = 1200;
|
||||
CP_UTF16BE = 1201;
|
||||
CP_NONE = 65535;
|
||||
|
||||
|
||||
|
@ -1686,7 +1686,10 @@ implementation
|
||||
begin
|
||||
inherited create(stringdef);
|
||||
stringtype:=st_widestring;
|
||||
encoding:=CP_UTF16;
|
||||
if target_info.endian=endian_little then
|
||||
encoding:=CP_UTF16LE
|
||||
else
|
||||
encoding:=CP_UTF16BE;
|
||||
len:=-1;
|
||||
savesize:=sizeof(pint);
|
||||
end;
|
||||
@ -1696,7 +1699,10 @@ implementation
|
||||
begin
|
||||
inherited ppuload(stringdef,ppufile);
|
||||
stringtype:=st_widestring;
|
||||
encoding:=CP_UTF16;
|
||||
if target_info.endian=endian_little then
|
||||
encoding:=CP_UTF16LE
|
||||
else
|
||||
encoding:=CP_UTF16BE;
|
||||
len:=ppufile.getaint;
|
||||
savesize:=sizeof(pint);
|
||||
end;
|
||||
@ -1706,7 +1712,10 @@ implementation
|
||||
begin
|
||||
inherited create(stringdef);
|
||||
stringtype:=st_unicodestring;
|
||||
encoding:=CP_UTF16;
|
||||
if target_info.endian=endian_little then
|
||||
encoding:=CP_UTF16LE
|
||||
else
|
||||
encoding:=CP_UTF16BE;
|
||||
len:=-1;
|
||||
savesize:=sizeof(pint);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user