Op Wed, 13 Jun 2007, schreef Felipe Monteiro de Carvalho:

> On 6/13/07, Florian Klaempfl <[EMAIL PROTECTED]> 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.

How hard is it to add that widestringmanager? Correct version of this 
program:

program utftestbom;

{$mode objfpc}{$H+}

uses SysUtils,cwstring;

var
  MyStr:ansistring;
  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.

Daniël
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to