From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dmta0007.nifty.com (mta-snd00010.nifty.com [106.153.226.42]) by sourceware.org (Postfix) with ESMTPS id E08E93858D39 for ; Thu, 21 Sep 2023 16:12:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E08E93858D39 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=nifty.ne.jp Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=nifty.ne.jp Received: from HP-Z230 by dmta0007.nifty.com with ESMTP id <20230921161203842.NREO.1140.HP-Z230@nifty.com> for ; Fri, 22 Sep 2023 01:12:03 +0900 Date: Fri, 22 Sep 2023 01:12:04 +0900 From: Takashi Yano To: cygwin@cygwin.com Subject: std::runtime_error on std::locale("") Message-Id: <20230922011204.bb166498090e6cbe163349f3@nifty.ne.jp> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: I wonder why the following code throws std::runtime_error even though the LC_ALL is set to valid locale other than "C". This does not occur only when LC_ALL is set to "C". #include int main() { std::locale(""); return 0; } In linux, this occurs only when the LC_ALL is set to invalid locale (i.e. locale that is not registered in system). Any idea? -- Takashi Yano