From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100300 invoked by alias); 3 Apr 2019 04:30:51 -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 100291 invoked by uid 89); 3 Apr 2019 04:30:51 -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, HContent-type:charset, HContent-type:text?= 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:30:49 +0000 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47652) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hBXY0-0004SR-4P; Wed, 03 Apr 2019 00:30:48 -0400 Received: from [176.228.60.248] (port=3868 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hBXXw-0007Wd-EX; Wed, 03 Apr 2019 00:30:45 -0400 Date: Wed, 03 Apr 2019 04:30:00 -0000 Message-Id: <8336mzg16k.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?B?0JLQu9Cw0LTQuNC80LjRgCDQnNCw0YDRgtGM0Y/QvdC+0LI=?= CC: gdb-patches@sourceware.org In-reply-to: (message from =?utf-8?B?0JLQu9Cw0LTQuNC80LjRgCDQnNCw0YDRgtGM0Y/QvdC+0LI=?= on Tue, 2 Apr 2019 23:08:38 +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> <83bm1qgwm2.fsf@gnu.org> 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/msg00039.txt.bz2 > From: Владимир Мартьянов > Date: Tue, 2 Apr 2019 23:08:38 +0300 > Cc: gdb-patches@sourceware.org > > пн, 1 апр. 2019 г. в 07:47, Eli Zaretskii : > > > > > + if (LocaleNameToLCID != NULL) > > > + { > > > + MultiByteToWideChar (CP_ACP, > > > + 0, > > > + buf, > > > + -1, > > > + wbuf, > > > + COUNTOF (wbuf) - 1); > > > + lcid = LocaleNameToLCID (wbuf, 0); > > > > This assumes that the code is compiled with UNICODE defined, which > > will then call LocaleNameToLCIDW. But the code in question is common > > to Cygwin and MinGW compilations, and the latter defaults to UNICODE > > undefined. So I think you need to call LocaleNameToLCIDW explicitly > > here. > > Unfortunately, there is no LocaleNameToLCIDA and LocaleNameToLCIDW, > there is only LocaleNameToLCID which accept widechar strings only. You are right, it was my mistake. Sorry.