[prev in list] [next in list] [prev in thread] [next in thread]
List: gnulib-bug
Subject: Re: Unicode string literals
From: Paul Eggert <eggert () cs ! ucla ! edu>
Date: 2020-04-30 22:22:06
Message-ID: 71a94beb-0401-e716-84bc-e44bf3e9164c () cs ! ucla ! edu
[Download RAW message or body]
On 4/30/20 2:05 PM, Marc Nieper-Wi=C3=9Fkirchen 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 a=
s 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 re=
liably.
Not sure it's worth worrying about.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic