mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 01:39:27 +02:00
* fixed bug in test exposed by r31038
git-svn-id: trunk@31044 -
This commit is contained in:
parent
d57a85a2de
commit
8e406cc7bd
@ -28,7 +28,8 @@ var
|
||||
Cp866Encoding,
|
||||
Cp1251Encoding: TEncoding;
|
||||
Bytes: TBytes;
|
||||
Cp1251String: TCp1251String;
|
||||
Cp1251String,
|
||||
Cp1251String2: TCp1251String;
|
||||
Cp866String: Tcp866String;
|
||||
S: AnsiString;
|
||||
U8: UTF8String;
|
||||
@ -46,7 +47,8 @@ begin
|
||||
halt(1);
|
||||
if StringCodePage(S)<>CP_ACP then
|
||||
halt(11);
|
||||
SetString(Cp1251String,pchar(Cp1251String),length(Cp1251String));
|
||||
Cp1251String2:=Cp1251String;
|
||||
SetString(Cp1251String,pchar(Cp1251String2),length(Cp1251String2));
|
||||
if StringCodePage(Cp1251String)<>1251 then
|
||||
halt(12);
|
||||
U1 := Cp866Encoding.GetString(Bytes);
|
||||
@ -86,4 +88,4 @@ begin
|
||||
Cp866Encoding.Free;
|
||||
Cp1251Encoding.Free;
|
||||
WriteLn('ok');
|
||||
end.
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user