Added TranslatePlaceholderCP in fpc_Read_Text_AnsiStr procedure.

This is a small optimization.
This commit is contained in:
Sergey Larin 2022-01-26 15:11:08 +03:00 committed by Jonas Maebe
parent a8b0e0ed65
commit ee2d313aa0

View File

@ -1819,6 +1819,7 @@ Begin
SetLength(s,Slen);
{$ifdef FPC_HAS_CPSTRING}
SetCodePage(s,TextRec(f).CodePage,false);
cp:=TranslatePlaceholderCP(cp);
if cp<>TextRec(f).CodePage then
s:=fpc_AnsiStr_To_AnsiStr(s,cp);
{$endif FPC_HAS_CPSTRING}