[fpc-devel] UTF-8 string literals
Michael Van Canneyt
michael at freepascal.org
Sun May 7 11:41:37 CEST 2017
On Sun, 7 May 2017, Mattias Gaertner wrote:
> On Sun, 7 May 2017 10:27:58 +0200
> Florian Klaempfl <florian at freepascal.org> wrote:
>
>> [...]
>> 2. What would happen then the other way around? When casting the string
>> constant to a PUnicodeChar (what probably a lot of delphi code does)?
>
> Good point.
>
>
>> [...]
>> I think, it would nice if Michael (v. C.) prepares some section for the
>> docs and we comment and help him to improve it.
>
> That would be highly appreciated.
I would be glad to do so, but I need something to start with.
In my reply to Sven I asked if a set of rules exist.
As far as I understand:
- By default, strings are stored internally as UTF-16.
- Unless it is an ascii string, in which case it is stored as plain ascii
- In special cases such as a typecast, the compiler stores them as UTF8 ?
A bit shallow...
Michael.
More information about the fpc-devel
mailing list