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 X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Sun, 7 Dec 2003 15:06:55 -0500 (EST) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: =?ISO-8859-1?Q?Marcelo_Rezende_M=F3dolo?= cc: cygwin AT cygwin DOT com Subject: Re: LOCALE ERROR In-Reply-To: <3FD3502C.2020600@terra.com.br> Message-ID: References: <3FD3502C DOT 2020600 AT terra DOT com DOT br> Importance: Normal MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-1; FORMAT=flowed Content-Transfer-Encoding: 8BIT Content-ID: On Sun, 7 Dec 2003, Marcelo Rezende Módolo wrote: > Hi, > I have a program that needs the locale support, so I include 'locale.h'. > I make the program but the output was wrong. > With the cygwin library the setlocale function do not work, but if I > link with mingw library it is ok I am sending a sample program that > demonstrate the error. > > Linking with CYGWIN: > marcelo AT est01 /usr/src/testes/locale/msdn > $ gcc -o crt_locale crt_locale.c > marcelo AT est01 /usr/src/testes/locale/msdn > $ > $ ./crt_locale.exe > In German locale, strftime returns 'x' > No Brasil locale, strftime retorna 'x' > In 'C' locale, strftime returns 'x' > marcelo AT est01 /usr/src/testes/locale/msdn > $ > > Linking with MINGW (-mno-cygwin) > marcelo AT est01 /usr/src/testes/locale/msdn > $ gcc -mno-cygwin -o crt_locale crt_locale.c > marcelo AT est01 /usr/src/testes/locale/msdn > $ > $ ./crt_locale.exe > In German locale, strftime returns 'Sonntag, 07. Dezember 2003' > No Brasil locale, strftime retorna 'domingo, 07 de dezembro de 2003' > In 'C' locale, strftime returns 'Sunday, December 07, 2003' > marcelo AT est01 /usr/src/testes/locale/msdn > $ > > Thanks, > Marcelo Modolo "man setlocale", "man strftime". Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "I have since come to realize that being between your mentor and his route to the bathroom is a major career booster." -- Patrick Naughton -- 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/