cpstrnew branch (was Re: [fpc-devel] Freepascal 2.4.0rc1 released)

Michael Schnell mschnell at lumino.de
Wed Nov 11 10:37:08 CET 2009

Marco van de Voort wrote:
> While I think it would be best to use native encoding on all platforms as
> much as possible, that is an opinion. However not using native encoding for
> general processing is nuts. So we need the UTF8 type anyway.

Of course that is true. So IMHO (at least) theses encoding types should
be supported:

- RawDWordString
- RawWordString (handled like good old WideStrings ?(*) )
- RawByteString (handled like good old Strings ?(*) )
- ANSI 8 Bit code page xxxx (*)
- UTF-8
- UTF-16
- 32 Bit Unicode (is this the same as RawDWordString, or is support for
Surrogate pairs and such necessary ?)

(*) what about comparing "if str1=str2 then..." regarding case
sensitivity ?

What about the appropriate character types ? (e.g. "char1 := String[1]")

I suppose there should be

- ANSICHAR: 8 Bits Type (for ANSI 8 Bit Strings) and
- UnicodeChar: 32 Bit Type (for all Unicode encoded strings)

Supporting automatic conversion (if possible).

The "Raw" Strings should output Byte, Word and DWORD appropriately.


More information about the fpc-devel mailing list