Переглянути джерело

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.

Sergey Larin 3 роки тому
батько
коміт
a8b0e0ed65
1 змінених файлів з 3 додано та 0 видалено
  1. 3 0
      rtl/inc/astrings.inc

+ 3 - 0
rtl/inc/astrings.inc

@@ -1461,6 +1461,9 @@ Procedure fpc_setstring_ansistr_pwidechar(out S : RawByteString; Buf : PWideChar
 Procedure SetString(out S : AnsiString; Buf : PWideChar; Len : SizeInt);
 {$endif}
 begin
+{$ifdef FPC_HAS_CPSTRING}
+  cp:=TranslatePlaceholderCP(cp);
+{$endif}
   if (Buf<>nil) and (Len>0) then
     widestringmanager.Wide2AnsiMoveProc(Buf,S,{$ifdef FPC_HAS_CPSTRING}cp{$else}DefaultSystemCodePage{$endif},Len)
   else