From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 18F893858288; Thu, 3 Nov 2022 13:39:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 18F893858288 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667482760; bh=H/panLrc0HhX6wok2GJ0X2Loku8c7KH5HlpAjBcy4Yk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OiqobeUd8rCuKV0vMmfLTC/vJKzRw8mDGPWkIZH7F5wLl8Z6lxg1CGznI0FxgSEKX URBsVCni2gCuBr1MV1hmrKm3BXC+GBkHKHWwKmqwBoOY0xMpZ8pCH0Aa0K5Z+Y7zD0 LvyFuXCfYKuM+rsdgDgGwQsFnbbvUlffBmau7PUE= From: "samuel.thibault@ens-lyon.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/41041] Documentation: -fwide-exec-charset defaults to UCS-4/UCS-2, not UTF-32/UTF-16 Date: Thu, 03 Nov 2022 13:38:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 4.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: samuel.thibault@ens-lyon.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: WONTFIX X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D41041 Samuel Thibault changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WONTFIX --- Comment #9 from Samuel Thibault --- It seems it indeed is by default a UTF encoding rather than a UCS encoding: $ LANG=3D gcc -fshort-wchar test.c -o test $ LANG=3D gcc -fshort-wchar test.c -o test -fwide-exec-charset=3DUTF-16LE= =20 $ LANG=3D gcc -fshort-wchar test.c -o test -fwide-exec-charset=3DUCS-2LE= =20 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[] =3D L"=F0=9D=84=9E"; | ^ 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 i= t.=