[fpc-pascal] rawbytestring

Jonas Maebe jonas.maebe at elis.ugent.be
Sun Aug 19 00:03:31 CEST 2012


On 18 Aug 2012, at 19:53, Marco van de Voort wrote:

> It turns out that rawbytestring is only such for 1-byte types, and anything
> else gets converted to the default ascii (1-byte) encoding, which is
> Windows-1252, resulting in lossy conversions.

Indeed, that was also mentioned afterwards in the previous discussions on this topic (see e.g. http://lists.freepascal.org/lists/fpc-devel/2011-September/026377.html )

> FPC 2.7.1 is fully compatible. This makes simply changing general RTL
> routines that take strings to rawbytestring difficult? Or am I missing
> something?

No, you indeed need separate overloads with rawbytestring and unicodestring (and possibly widestring, although I don't think that's necessary; even Delphi doesn't do that, afaik).


Jonas


More information about the fpc-pascal mailing list