bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unicode string literals


From: Paul Eggert
Subject: Re: Unicode string literals
Date: Thu, 30 Apr 2020 15:22:06 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

On 4/30/20 2:05 PM, Marc Nieper-Wißkirchen wrote:
>> Could we have a macro to be used only in source code encoded via UTF-8?
>> Presumably the older compilers would process the bytes of the string as if 
>> they
>> were individual 8-bit characters and would pass them through unchanged, so 
>> the
>> run-time string would be UTF-8 too.

> This would allow writing a macro that prefixes "u8" to strings in
> compilers supporting enough of C11, skipping the prefix in compilers
> that pass UTF-8 encoded bytes in strings unchanged

Yes, that was the idea.

> and signal an error
> in all other cases (hopefully only very exotic platforms), right?

I wasn't thinking of requiring a diagnostic of that case, at least not reliably.
Not sure it's worth worrying about.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]