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.