https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41041

Samuel Thibault <samuel.thiba...@ens-lyon.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #9 from Samuel Thibault <samuel.thiba...@ens-lyon.org> ---
It seems it indeed is by default a UTF encoding rather than a UCS encoding:

$ LANG= gcc -fshort-wchar test.c -o test
$ LANG= gcc -fshort-wchar test.c -o test   -fwide-exec-charset=UTF-16LE 
$ LANG= gcc -fshort-wchar test.c -o test   -fwide-exec-charset=UCS-2LE 
test.c: In function `main':
test.c:7:27: error: converting to execution character set: Invalid or
incomplete multibyte or wide character
    7 |         wchar_t s[] = L"𝄞";
      |                           ^

Now there is indeed the question of the BOM. Ideally the text could mention all
of UTF-32LE, UTF-32BE, UTF-16LE, UTF-16BE, but not sure it's really worth it.

Reply via email to