On 2022-03-24 20:47, Santi via fpc-pascal wrote:
El 23/03/2022 a las 10:51, Mattias Gaertner via fpc-pascal escribió:
FPC does not yet understand comments,
What do you mean with "understand comments"?
Mattias meant that comments were the only place where information about
use of CP1252 was
El 23/03/2022 a las 10:51, Mattias Gaertner via fpc-pascal escribió:
FPC does not yet understand comments,
What do you mean with "understand comments"?
so maybe it does not know this
literal is cp1252. Add {$codepage cp1252} somewhere at the start of
the unit.
If this is part of a Lazarus ap
On Tue, 22 Mar 2022 04:47:50 -0400
cibersvaa--- via fpc-pascal wrote:
> Lazarus 2.012
> FPC: 3.2.0
> SVN: 64642
> OS: Windows 10 Pro/win64
>
> I'm reading from a file with character set win1252, I want to convert
> it to utf8, but I can't.
>
> procedure TestString;
> var
>Original:string;
>
procedure TestString;
var
Original:string;
Converted:string;
begin
original:='ESPA'#209'A'; //ESPAÑA WIN1252
Converted:=ansiToUtf8(original); // converts to 'ESPA'#239#191#189'A'
// converted Should be 'ESPA'#195#145'A'
end;
I've tried playing with strings types, string, rawstring,ans