From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 28092 invoked from network); 19 Jul 2023 08:30:36 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 19 Jul 2023 08:30:36 -0000 Received: (qmail 5235 invoked by uid 550); 19 Jul 2023 08:30:33 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 5202 invoked from network); 19 Jul 2023 08:30:33 -0000 X-Proofpoint-ORIG-GUID: fzqR5hiApgmar8S3LX6l_FBsh6DO_jh3 X-Proofpoint-GUID: fzqR5hiApgmar8S3LX6l_FBsh6DO_jh3 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.591,18.0.957 definitions=2023-07-11_09:2023-07-11,2023-07-11 signatures=0 X-Proofpoint-Spam-Details: rule=interactive_user_notspam policy=interactive_user score=0 phishscore=0 bulkscore=0 spamscore=0 malwarescore=0 mlxlogscore=315 adultscore=0 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2307110153 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=from : content-type : content-transfer-encoding : mime-version : subject : message-id : date : to; s=20180706; bh=9oGTP3VZ97QBE9iqppvpwMx7JYXMxSsjhy8XzDoVutI=; b=kLFXjoO5Or/iiRYcZ21Fxl38tCUt6B60caSjq+zk38WYElrhUBuEB9CHFJnFJXqPcidW WsRx5uIRuvdiTBBxq8bYLNfHORBniNDaLw1NG/okFPZpeZuKVWFwRmqpwF3tdCpGJf1Q WXrU9BFgQYpWI/eWkBXJA0aDgvLPB6nTIFXliCyPUZYpFKthp7HzC0/jUm0AIMp9OmX4 DCi1UFueuMRLqeA5fMbBEvkzDLcDTn9pr9uvN98LufBeDnw2HLydriqZplkloI+EXLw5 boYtVLkA4EW0HxHRukv1bmdRYno32nNShVxh3YzsiYFBelopq1msH8ajVQoqQDJSfYcO uA== X-Va-A: X-Va-T-CD: 14dc138f66d48087821ca031f1b11e6a X-Va-E-CD: 98dffb3e312fb50a8f4cf58b034435b8 X-Va-R-CD: 21da488873b00c2835cbff04366afd3e X-Va-ID: 46df01fe-6538-43ad-a621-2ccac017eeac X-Va-CD: 0 X-V-A: X-V-T-CD: 14dc138f66d48087821ca031f1b11e6a X-V-E-CD: 98dffb3e312fb50a8f4cf58b034435b8 X-V-R-CD: 21da488873b00c2835cbff04366afd3e X-V-ID: 5130c0c2-7ff9-41e3-8f6e-026710fee4e8 X-V-CD: 0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.591,18.0.957 definitions=2023-07-19_04:2023-07-17,2023-07-19 signatures=0 From: Alastair Houghton Content-type: text/plain; charset=utf-8 Content-transfer-encoding: quoted-printable MIME-version: 1.0 (Mac OS X Mail 16.0 \(3769.100.3\)) Message-id: <92D1805E-DEAE-4BB4-94F0-38EB24F2EE33@apple.com> Date: Wed, 19 Jul 2023 09:30:08 +0100 To: musl@lists.openwall.com X-Mailer: Apple Mail (2.3769.100.3) Subject: [musl] setlocale() behaviour Hi there, Presently, musl=E2=80=99s setlocale() function essentially always = succeeds, even if it doesn=E2=80=99t actually have data for the = requested locale. I note the previous message to the list in 2017 discussing potential solutions, but unless I=E2=80=99m much mistaken = nothing has really changed in the code? This has come up because the test rig for libc++ tries to detect which = locale data is installed so that it can run its own locale support tests = (it=E2=80=99s trying to test the C++ locale support that it has = constructed atop the C library=E2=80=99s underlying locale support). = If, for instance, you don=E2=80=99t have data for fr_FR installed, = libc++ won=E2=80=99t run test cases that rely on that data. On other C = library implementations, that=E2=80=99s easy because setlocale() will = return NULL in such a case, but musl doesn=E2=80=99t do that - instead, = it sets up a copy of C.UTF-8, names it fr_FR and sets that as the = current locale :-( Kind regards, Alastair.