From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 69597 invoked by alias); 10 Jan 2019 00:51:19 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 69587 invoked by uid 89); 10 Jan 2019 00:51:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=jony, JonY, shrug, claim X-HELO: mail-it1-f175.google.com Received: from mail-it1-f175.google.com (HELO mail-it1-f175.google.com) (209.85.166.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 10 Jan 2019 00:51:17 +0000 Received: by mail-it1-f175.google.com with SMTP id z7so14705154iti.0 for ; Wed, 09 Jan 2019 16:51:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=L0Nc1KhzlauwWeHIJuhdmr8p40uaoz0IF6u9+Eo5L/I=; b=VQdawt9qj56GhuNcCSHkbtqzVsi1h7xfqdJoA1Ba8GqPGGRiAWlgzwMuGXzE48ottV 3/VGyFERLmb4X44JFVqkA0U6iGugLWPoLhL/ljft2pB52YGXBGWybV1A2MW+MOz1Tkr1 dKkByXIif18tuUj1JNpRtgyQkJ0ZqUxbJiXmk6nDJYtdcViAek0J3Rq7B6Wv8QFNoLmY fFRaDpdncub04N7pcEFdO9LWa1taqm8GqSP+LymDAkmQ3r//298W4prlkUnESYjRwfkl j/KjWa8v7H/vP0siGvveL3PeglDFw8CJcQmahhHbY9V6XJt559/871n+AjfbKLWSZUV1 Hj+A== MIME-Version: 1.0 Received: by 2002:a4f:1fc4:0:0:0:0:0 with HTTP; Wed, 9 Jan 2019 16:51:14 -0800 (PST) In-Reply-To: <7e17d15b-1c68-1580-60f8-0ad091a31570@gmail.com> References: <92c7e8c2-c440-1bb8-f329-23951d10dffe@gmail.com> <2ec22a55-c5d6-d425-02fe-ec9508a30275@obj-sys.com> <7e17d15b-1c68-1580-60f8-0ad091a31570@gmail.com> From: Lee Date: Thu, 10 Jan 2019 00:51:00 -0000 Message-ID: Subject: Re: i686-w64-mingw32-gcc: LC_MESSAGES To: cygwin@cygwin.com Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg00059.txt.bz2 On 1/9/19, JonY wrote: > On 1/9/19 7:43 PM, Lee wrote: >>> MSVCR = MicroSoft Visual C Run-time (I think) >> > > Yes, as implemented by msvcrt.dll. cool - makes much more sense now. Thank you! >> Meaning i686-w64-mingw32-gcc uses the Microsoft libraries vs. cygwin >> gcc using posix compliant libraries? Implying LC_MESSAGES not being >> defined is yet another instance of Microsoft not following accepted >> standards? >> > > Cygwin has its own runtime, Windows has its own. Microsoft does whatever > it well pleases, it never did claim POSIX or ISO C compliance. > > See the printf/scanf hacks in mingw. > >> The background for my question is >> https://github.com/htacg/tidy-html5/issues/770 >> Tidy removed the setlocale call from the library init function, so if >> users want a specific locale/language they're going to have to set it >> up themselves. >> I'd like to update the tidylib example code showing how to set the >> language, but >> setlocale(LC_ALL, ""); >> tidySetLanguage( setlocale(LC_MESSAGES, NULL) ); >> probably isn't a good example if LC_MESSAGES is missing on some systems. >> > > Unfortunately, I don't know how that should be implemented on top of a > proprietary runtime layer, or any alternative function calls for that > matter. Me either, which is why I was trying to keep it limited to system calls. But tidySetLanguage( setlocale(LC_ALL, NULL) ); isn't a good idea because setlocale returns a string starting with the value of LC_COLLATE & I suspect there's plenty enough others that prefer ascii sort order to dictionary sort order or whatever it's called. ^shrug^ since it is just example code, if LC_MESSAGES isn't defined maybe just tell them to pick a default & use that... Thanks Lee -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple