mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 08:09:33 +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
|
||||
U:=UnicodeString(S1)+UnicodeString(S2);
|
||||
widestringmanager.Unicode2AnsiMoveProc(PUnicodeChar(JLString(U).toCharArray),DestS,cp,Length(U));
|
||||
AnsistringClass(DestS).fCodePage:=cp;
|
||||
end;
|
||||
{$endif FPC_HAS_ANSISTR_CONCAT_COMPLEX}
|
||||
|
||||
|
@ -36,6 +36,7 @@ begin
|
||||
byte written" -> we already have a terminating zero }
|
||||
outbuf.get(TJByteArray(AnsiStringClass(dest).fdata),0,outbuf.limit);
|
||||
{ already null-terminated because of setlength }
|
||||
SetCodePage(dest,cp,false);
|
||||
end;
|
||||
|
||||
|
||||
@ -321,7 +322,6 @@ begin
|
||||
if (cp=CP_ACP) then
|
||||
cp:=DefaultSystemCodePage;
|
||||
widestringmanager.Unicode2AnsiMoveProc(punicodechar(@arr), RawByteString(fpc_UChar_To_AnsiStr), cp, 1);
|
||||
AnsistringClass(fpc_UChar_To_AnsiStr).fCodePage:=cp;
|
||||
end;
|
||||
|
||||
|
||||
@ -357,7 +357,6 @@ begin
|
||||
cp:=DefaultSystemCodePage;
|
||||
arr[0]:=c;
|
||||
widestringmanager.Unicode2AnsiMoveProc(punicodechar(@arr[0]), fpc_UChar_To_AnsiStr, cp, 1);
|
||||
AnsistringClass(fpc_UChar_To_AnsiStr).fCodePage:=cp;
|
||||
end;
|
||||
{$endif FPC_HAS_UCHAR_TO_ANSISTR}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user