[fpc-pascal] Delphi / FPC and UTF8 BOM
Felipe Monteiro de Carvalho
felipemonteiro.carvalho at gmail.com
Tue Oct 21 19:29:27 CEST 2008
There has been a lot of discussion about this problem. What happens is
that FPC wishes to always have ansistrings holding system locale
encoded strings, it's impossible to have strings which store utf-8
data as far as FPC is concerned.
In Lazarus we consider that the best solution is storing utf-8 data in
ansistrings for a series of reason, but the fpc team didn't agree.
The current proposal of the FPC team is to have a new string type
which would hold any kind of string, so that you can set it to the
desired encoding before doing some use which requires a given
encoding. The type is still theorical.
To share code at the moment I do a IFDEF. If in Delphi, then I convert
the string from utf-8 to ansi and I don't use the BOM.
--
Felipe Monteiro de Carvalho
More information about the fpc-pascal
mailing list