Русская... Я и от эмуляторов добиться ничего не могу
Задаю просто строку, всё нормально...
Но из файла читает как попало...
Вот код...
program NewProject3;
var
res:resource;
st:string;
function Str2UTF8(s: string):string;
var
i:integer;
a:string;
begin
a:='';
for i:= 0 to Length(s) do
if GetChar(s, i) > '~' then a:= a + Chr(Ord(GetChar(s, i)) - 64432)
else a:= a + GetChar(s, i);
Str2UTF8:= Copy(a, 0, Length(a)-1);
end;
begin
res:=OpenResource('/data.txt');
st:=ReadLine(res);
st:=Str2UTF8(st);
drawText(st,0,0);
repaint;
delay(5000);
end.
P.S. data.txt набран в MP и содержит: Привет ВСЕМ!!!