mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-24 14:49:11 +02:00
Added TranslatePlaceholderCP before Wide2AnsiMoveProc call.
In the fpc_setstring_ansistr_pwidechar procedure, before calling Wide2AnsiMoveProc, the translation cp = 0 to the DefaultSystemCodePage has been added. Note: In all other places such translation is present.
This commit is contained in:
parent
68cd1c3973
commit
a8b0e0ed65
@ -1461,6 +1461,9 @@ Procedure fpc_setstring_ansistr_pwidechar(out S : RawByteString; Buf : PWideChar
|
|||||||
Procedure SetString(out S : AnsiString; Buf : PWideChar; Len : SizeInt);
|
Procedure SetString(out S : AnsiString; Buf : PWideChar; Len : SizeInt);
|
||||||
{$endif}
|
{$endif}
|
||||||
begin
|
begin
|
||||||
|
{$ifdef FPC_HAS_CPSTRING}
|
||||||
|
cp:=TranslatePlaceholderCP(cp);
|
||||||
|
{$endif}
|
||||||
if (Buf<>nil) and (Len>0) then
|
if (Buf<>nil) and (Len>0) then
|
||||||
widestringmanager.Wide2AnsiMoveProc(Buf,S,{$ifdef FPC_HAS_CPSTRING}cp{$else}DefaultSystemCodePage{$endif},Len)
|
widestringmanager.Wide2AnsiMoveProc(Buf,S,{$ifdef FPC_HAS_CPSTRING}cp{$else}DefaultSystemCodePage{$endif},Len)
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user