X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F16DA3858017 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1695313779; bh=rn4eKe1xfEG4oCq/bwTmQREOEDN0EmI+W4KOiO3GCaE=; h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=YT7bLUUxisVpZQfNTHCnP9l9+X/DQDiMR5y0UYjwDV2gu5a8upKGcLxvykKO2iOXj W2miRaUcufM0FS6K6hSQXK81QQfrxWRuiqlvoSq7vhczkbj4jgodmTbL1yPsI9MD5N WwNpo0wREQy6k/lzS4h3v0GzKsw+9iX1zmktaVTM= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A164A3858D39 Date: Fri, 22 Sep 2023 01:28:56 +0900 To: cygwin AT cygwin DOT com Subject: Re: std::runtime_error on std::locale("") Message-Id: <20230922012856.47872090281f2a303fd7b99f@nifty.ne.jp> In-Reply-To: <20230922011204.bb166498090e6cbe163349f3@nifty.ne.jp> References: <20230922011204 DOT bb166498090e6cbe163349f3 AT nifty DOT ne DOT jp> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, NICE_REPLY_A, 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 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Takashi Yano via Cygwin Reply-To: Takashi Yano Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" On Fri, 22 Sep 2023 01:12:04 +0900 Takashi Yano wrote: > 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). Similarly, std::locale("ja_JP.UTF-8") throws std::runtime_error in cygwin. -- Takashi Yano -- 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