public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Lee <ler762@gmail.com>
To: cygwin@cygwin.com
Subject: Re: i686-w64-mingw32-gcc: LC_MESSAGES
Date: Thu, 10 Jan 2019 00:51:00 -0000	[thread overview]
Message-ID: <CAD8GWss_pNnE-Mt1sYSkyUqB3pQZcDFP=7uKoT3kAmQq2RJwTw@mail.gmail.com> (raw)
In-Reply-To: <7e17d15b-1c68-1580-60f8-0ad091a31570@gmail.com>

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

      reply	other threads:[~2019-01-10  0:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-08 21:26 Lee
2019-01-09 10:21 ` JonY
2019-01-09 18:14   ` Lee
2019-01-09 18:19     ` Douglas Coup
2019-01-09 19:43       ` Lee
2019-01-09 23:41         ` Brian Inglis
2019-01-10  0:07           ` Lee
2019-01-09 23:43         ` JonY
2019-01-10  0:51           ` Lee [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAD8GWss_pNnE-Mt1sYSkyUqB3pQZcDFP=7uKoT3kAmQq2RJwTw@mail.gmail.com' \
    --to=ler762@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).