On 2017-05-07 09:10, Florian Klaempfl via Lazarus wrote:
>> Yeah, that would be the logical thing to do. 
>
> Why? What makes a string literal UTF-8?
> 

As Mattias said, the fact that the source unit is UTF-8 encoded.
Defined by a BOM marker, or -Fcutf8 or {$codepage utf8}. If the source
unit is UTF-8 encoded, the literal string constant can't (and
shouldn't) be in any other encoding.

I would say the same if the source unit was stored in UTF-16
encoding. Then string literals would be treated as UTF-16.

It's perfectly logical to me.

Regards,
  Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
-- 
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to