delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2023/09/21/12:12:24

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2057738582A9
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1695312743;
bh=+OU9ScYd7SfYLtB2uPdhOWDHZgLRCcXI8jA2XISCpWs=;
h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:
List-Help:List-Subscribe:From:Reply-To:From;
b=OP8yetTI1xa5GQRZSovnIJ2juEAcAJO9jLHC9uZC0d0BWTWok3zeQ912UenuN0TdO
Q6M8/YhyH1eUclEh0X9SeFt34SFagDLJI7MnNF5Bq0i8jgl6UZzlxm8d4s4KH7fYKH
yff09iGU6SdAa6uK6JTkI0ThEU11EXCAeOhILsDk=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E08E93858D39
Date: Fri, 22 Sep 2023 01:12:04 +0900
To: cygwin AT cygwin DOT 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
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
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Takashi Yano via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

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 <locale>
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 <takashi DOT yano AT nifty DOT ne DOT jp>

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019