[fpc-pascal] Funny things about utf-8 strings on mac
Felipe Monteiro de Carvalho
felipemonteiro.carvalho at gmail.com
Wed Jun 13 13:33:29 CEST 2007
On 6/13/07, Florian Klaempfl <florian at freepascal.org> wrote:
> Then you have to use the utf8string type. If it doesn't work good
> enough, we've to fix it.
changing on my program from strint to utf8string didn't make any
difference. The string is ok when I don't have BOM and is wrong with a
BOM
program utftestbom;
{$mode objfpc}{$H+}
uses SysUtils;
var
MyStr: UTF8String;
i: Integer;
begin
MyStr := 'Texto ł ñ ø ß á';
WriteLn('Printing string values');
WriteLn('Length: ', Length(MyStr));
for i := 1 to Length(MyStr) do
Write(IntToHex(Integer(MyStr[i]), 2) + ' ');
WriteLn('');
end.
More information about the fpc-pascal
mailing list