From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5964A3858022; Tue, 22 Nov 2022 11:51:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5964A3858022 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669117906; bh=A7gh7Le6xkRF9SaNGphia+Ap5+kc+IZWO6gK4c8aqgQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=kaSiPYPErTzlyYWeYFuerDG8tIRc/bnqf5I5qpJf6u0sU/Ruz3D+a7HrXIYrsh5pA pJjN1im6btZj/9BZq90LxEAqLZvQwEhCNtH6v37VW63qMH7Dv+fsLSzzja586sBeLW 2FGery0jFxqwJPOawDG0ae9u4TdDryUtLCDz+BVY= From: "ulf.lorenz at ptvgroup dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/95048] [10/11 Regression] wstring-constructor of std::filesystem::path throws for non-ASCII characters Date: Tue, 22 Nov 2022 11:51:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ulf.lorenz at ptvgroup dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: redi at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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=3D95048 --- Comment #23 from Ulf Lorenz --- I have just one tiny comment on the patches, and that is the tests. In my original submission, I also modified the tests that verify the path output (path::wstring() in particular) that AFAIR also had the encoding problem. In particular, the file libstdc++-v3/testsuite/27_io/filesystem/path/native/string.cc is lacking a = test with std::path that uses non-Ascii characters.There is test02() which looks good except that the string "abc" does not catch most conversion problems, = and there is test04() that does not test for path::wstring(). So I think, test04() could just do with a few lines like #ifdef _GLIBCXX_USE_WCHAR_T auto strw =3D p.wstring(); VERIFY( strw =3D=3D L"\xf0\x9d\x84\x9e"); #endif=