mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-05-01 09:13:41 +02:00
37 lines
536 B
ObjectPascal
37 lines
536 B
ObjectPascal
{ %skiptarget=win32,win64,wince }
|
|
{ This test is only usefull if the local codepage is utf-8 which
|
|
usually not the case on windows
|
|
}
|
|
{$codepage utf-8}
|
|
|
|
{$mode objfpc}
|
|
uses
|
|
{$ifdef unix}
|
|
cwstring,
|
|
{$endif}
|
|
sysutils;
|
|
|
|
{$i+}
|
|
|
|
var
|
|
t: text;
|
|
w: widestring;
|
|
a: ansistring;
|
|
|
|
begin
|
|
assign(t,'twide3.txt');
|
|
rewrite(t);
|
|
writeln(t,'łóżka');
|
|
close(t);
|
|
reset(t);
|
|
try
|
|
readln(t,a);
|
|
w:=a;
|
|
if (w<>'łóżka') then
|
|
raise Exception.create('wrong string read');
|
|
finally
|
|
close(t);
|
|
erase(t);
|
|
end;
|
|
end.
|