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]

cygwin locale broken? (was: Re: gnome 2.8.0 and external dependencies)


Hi Yang,

I switched this thread over to the main list.

> Just try the small test program attached below

> $ gcc -o localetest localetest.c
> $ ./localetest fr_FR
> changed to: (null)
> current LC_ALl: C
> current LC_CTYPE: C

> $ gcc -o xlocaletest -DX_LOCALE -I/usr/X11R6/include localetest.c
> -L/usr/X11R6/lib -lX11
> $ ./xlocaletest fr_FR
> changed to: fr_FR
> current LC_ALl: fr_FR
> current LC_CTYPE: fr_FR

> (and IIRC, David Huang sent a message to this list discussing about
> this issue last year, but cgf said there's no one bother to improve
> the implementation of the locale support of cygwin1.dl itself)

If there is no one fixing it then it will stay as it is, why is cygwin
locale broken, what is broken, how to fix it?  I don't want to patch 50
packages because some locale implementation is broken, better fix it
once and forever?

And if it is working for X it should not be too hard to get it working
in Cygwin too.


> ------------- 8< --------------
> localetest.c-----------------------------
> #ifdef X_LOCALE
> #include <X11/Xlocale.h>
> #else
> #include <locale.h>
> #endif


> void check_locale()
> {
>     char *curr;

>     /* Get the name of the current locale.  */
>     curr=setlocale(LC_ALL, NULL);
>     printf("current LC_ALl: %s\n", curr);

>     curr=setlocale(LC_CTYPE, NULL);
>     printf("current LC_CTYPE: %s\n", curr);
> }

> int main(int argc, char *argv[])
> {
>   if (argc<=1) {
>     check_locale();
>   } else {
>     char *new;
>     new = setlocale(LC_ALL, argv[1]);
>     printf("changed to: %s\n", new);

>     check_locale();
>   }
>    return 0;
> }


Gerrit
-- 
=^..^=


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]