From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3430 invoked by alias); 3 Apr 2019 04:48:26 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 3232 invoked by uid 89); 3 Apr 2019 04:48:16 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: =?ISO-8859-1?Q?No, score=-1.3 required=5.0 tests=AWL,BAYES_00,BODY_8BITS,GARBLED_BODY,SPF_PASS autolearn=no version=3.3.1 spammy==d0=b0=d1, H*r:142, intl, LANGUAGE?= X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (209.51.188.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 03 Apr 2019 04:47:39 +0000 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47760) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hBXoG-0002Bs-N0; Wed, 03 Apr 2019 00:47:36 -0400 Received: from [176.228.60.248] (port=4911 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hBXoE-0001G8-Pa; Wed, 03 Apr 2019 00:47:35 -0400 Date: Wed, 03 Apr 2019 04:48:00 -0000 Message-Id: <83wokbelu2.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?B?0JLQu9Cw0LTQuNC80LjRgCDQnNCw0YDRgtGM0Y/QvdC+0LI=?= CC: jon.turney@dronecode.org.uk, gdb-patches@sourceware.org In-reply-to: (message from =?utf-8?B?0JLQu9Cw0LTQuNC80LjRgCDQnNCw0YDRgtGM0Y/QvdC+0LI=?= on Tue, 2 Apr 2019 23:57:35 +0300) Subject: Re: [PATCH][PR server/24377] Fix mixing English and system default languages in error messages on Windows References: <83mullpwg6.fsf@gnu.org> <83ef6qjdbb.fsf@gnu.org> <838swyjafd.fsf@gnu.org> <837echkgjo.fsf@gnu.org> <8336n3hzkx.fsf@gnu.org> <7041169d-9f64-fcce-2c3c-021dd1858923@dronecode.org.uk> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-IsSubscribed: yes X-SW-Source: 2019-04/txt/msg00040.txt.bz2 > From: Владимир Мартьянов > Date: Tue, 2 Apr 2019 23:57:35 +0300 > Cc: gdb-patches@sourceware.org > > > - You're not checking all the environment variables which might control > > the locale for the message locale category (See e.g. [1]). I don't think > > there's any need to do this by hand, since you should be able to use the > > result of setlocale(LC_MESSAGE, NULL)? > > Yes, you are right, I missed "LANGUAGE" var because it's in another > file in /intl/ > Wish I had a function for this. _nl_locale_name from intl/localename.c > looks good,but it doesn't read LANGUAGE var and I have errors when > include intl/gettextP.h > > I'm able to use results from setlocale(), but how can the user > influenсe the result of setlocale? Beware: only the Cygwin setlocale supports environment variables, the native MS-Windows implementation used by MinGW does not.