Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Thu, 30 Sep 2004 17:36:28 +0200 From: "Gerrit P. Haase" Reply-To: "Gerrit @ cygwin.com" Organization: Esse keine toten Tiere Message-ID: <97654690525.20040930173628@familiehaase.de> To: Yang Guilong CC: cygwin AT cygwin DOT com Subject: cygwin locale broken? (was: Re: gnome 2.8.0 and external dependencies) In-Reply-To: References: <274233419 DOT 20040915234721 AT familiehaase DOT de> <4159BD25 DOT 7040700 AT users DOT sourceforge DOT net> <415A112E DOT 20808 AT familiehaase DOT de> <415AE19A DOT 1010306 AT familiehaase DOT de> MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-IsSubscribed: yes 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 > #else > #include > #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/