mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 19:29:39 +02:00
* set destination codepage in widestringmanager.Unicode2AnsiMoveProc() like
on other platforms, rather than explicitly setting it afterwards everywhere git-svn-id: branches/jvmbackend@20902 -
This commit is contained in:
parent
02413c8a57
commit
1efee1d2eb
@ -266,7 +266,6 @@ var
|
|||||||
begin
|
begin
|
||||||
U:=UnicodeString(S1)+UnicodeString(S2);
|
U:=UnicodeString(S1)+UnicodeString(S2);
|
||||||
widestringmanager.Unicode2AnsiMoveProc(PUnicodeChar(JLString(U).toCharArray),DestS,cp,Length(U));
|
widestringmanager.Unicode2AnsiMoveProc(PUnicodeChar(JLString(U).toCharArray),DestS,cp,Length(U));
|
||||||
AnsistringClass(DestS).fCodePage:=cp;
|
|
||||||
end;
|
end;
|
||||||
{$endif FPC_HAS_ANSISTR_CONCAT_COMPLEX}
|
{$endif FPC_HAS_ANSISTR_CONCAT_COMPLEX}
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@ begin
|
|||||||
byte written" -> we already have a terminating zero }
|
byte written" -> we already have a terminating zero }
|
||||||
outbuf.get(TJByteArray(AnsiStringClass(dest).fdata),0,outbuf.limit);
|
outbuf.get(TJByteArray(AnsiStringClass(dest).fdata),0,outbuf.limit);
|
||||||
{ already null-terminated because of setlength }
|
{ already null-terminated because of setlength }
|
||||||
|
SetCodePage(dest,cp,false);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -321,7 +322,6 @@ begin
|
|||||||
if (cp=CP_ACP) then
|
if (cp=CP_ACP) then
|
||||||
cp:=DefaultSystemCodePage;
|
cp:=DefaultSystemCodePage;
|
||||||
widestringmanager.Unicode2AnsiMoveProc(punicodechar(@arr), RawByteString(fpc_UChar_To_AnsiStr), cp, 1);
|
widestringmanager.Unicode2AnsiMoveProc(punicodechar(@arr), RawByteString(fpc_UChar_To_AnsiStr), cp, 1);
|
||||||
AnsistringClass(fpc_UChar_To_AnsiStr).fCodePage:=cp;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -357,7 +357,6 @@ begin
|
|||||||
cp:=DefaultSystemCodePage;
|
cp:=DefaultSystemCodePage;
|
||||||
arr[0]:=c;
|
arr[0]:=c;
|
||||||
widestringmanager.Unicode2AnsiMoveProc(punicodechar(@arr[0]), fpc_UChar_To_AnsiStr, cp, 1);
|
widestringmanager.Unicode2AnsiMoveProc(punicodechar(@arr[0]), fpc_UChar_To_AnsiStr, cp, 1);
|
||||||
AnsistringClass(fpc_UChar_To_AnsiStr).fCodePage:=cp;
|
|
||||||
end;
|
end;
|
||||||
{$endif FPC_HAS_UCHAR_TO_ANSISTR}
|
{$endif FPC_HAS_UCHAR_TO_ANSISTR}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user