This is the mail archive of the cygwin mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
[for the bug-gnu-gettext list, this thread started here: http://cygwin.com/ml/cygwin/2011-08/msg00506.html and was posted immediately after the release of gettext-0.18.1.1 for cygwin (which had not been updated since 0.17). On 30.08.2011 06:18, Voelker, Bernhard wrote: > Starting with today's update, cygwin started speaking German: > > $ mkdir -v x0 > mkdir: Verzeichnis ÃâÅx0ÃâÅ angelegt > $ LANG=C mkdir -v x2 > mkdir: created directory `x2' > $ LANG=C.UTF-8 mkdir -v x1 > mkdir: Verzeichnis ÃâÅx1ÃâÅ angelegt > > Default is LANG=C.UTF-8 here. > > Ok, the PC is in Germany, but none of my environment > variables have a 'de' inside. I can reproduce this behavior; the workaround for now is to use $LC_ALL or $LC_CTYPE instead of $LANG. I think I have an inkling about what is causing this problem -- but I'm not real clear on how to fix it. The issue is, (new) libintl implements its own [libintl_]setlocale function, which eventually calls the cygwin setlocale. The old libintl did neither of those things. Now, under the old mechanism, cygwin's setlocale() was called directly (by the app), and cygwin::setlocale did its magic with the LC_ALL, LC_CTYPE, and/or LANG variables. However, *new* libintl now, I think, calls its own [libintl_]setlocale replacement internally, and that messes up the effect of the application's own direct-to-cygwin's setlocale() call. I think it is because libintl_setlocale() will not allow cygwin::setlocale() to exercise its default behavior wrt $LANG, since it *always* calls the underlying OS setlocale with a specific LC_???? subtype, never LC_ALL -- and always with a specific locale string, never "". (I think) I've attached a compressed copy of the setlocale implementation, if anybody (CALL FOR HELP) can suggest a mechanism -- or better, provide a patch -- to make libintl_setlocale Do The Right Thing on cygwin. -- Chuck
Attachment:
setlocale.c.xz
Description: Binary data
-- 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
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |