[fpc-pascal] Delphi / FPC and UTF8 BOM
Marco van de Voort
marcov at stack.nl
Wed Oct 22 13:31:41 CEST 2008
In our previous episode, Martin Schreiber said:
> > The solution has Windows written all over it (including viewer UTF-8 as a
> > codepage), but it has merits IMHO.
>
> Are you sure about the encoding field for every string instance?
Yes.
> It could be done by compiler magic and an encoding field in the typeinfo
> too?
No, since then the runtime routines must be overloaded again, for each
compiler magic'ed type (all codepages +UTF-8, and another two).
A runtime routine must be able to detect what kind of string type it
receives, or you need a runtime routine per type.
More information about the fpc-pascal
mailing list