delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/12/07/19:37:05

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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: Sun, 7 Dec 2003 16:36:45 -0800
From: Yitzchak Scott-Thoennes <sthoenna AT efn DOT org>
To: cygwin AT cygwin DOT com
Subject: Re: LOCALE ERROR
Message-ID: <20031208003645.GA3252@efn.org>
References: <3FD3502C DOT 2020600 AT terra DOT com DOT br> <Pine DOT GSO DOT 4 DOT 56 DOT 0312071506150 DOT 16580 AT slinky DOT cs DOT nyu DOT edu> <3FD3C2A0 DOT 4050208 AT terra DOT com DOT br>
Mime-Version: 1.0
In-Reply-To: <3FD3C2A0.4050208@terra.com.br>
User-Agent: Mutt/1.4i
Organization: bs"d

On Sun, Dec 07, 2003 at 09:15:28PM -0300, Marcelo Rezende Módolo <mrmodolo AT terra DOT com DOT br> wrote:
> I read the man pages "man setlocale", "man strftime" and find a mistake 
> in str format.

Did you read the part about only the minimum locale support being present?

> I use ' if (!strftime((char *)str, 100, "%#x", (const struct tm 
> *)thetime))' but the correct is
> ' if (!strftime((char *)str, 100, "%x", (const struct tm *)thetime))'...
> But I still have the same output for all setlocale I use.
> setlocale(LC_ALL, "C");
> setlocale(LC_ALL, "pt_BR");
> setlocale(LC_ALL, "ja");
> ...
> $ ./crt_locale.exe
> 'Mon Dec 08 2003'
> 'Mon Dec 08 2003'
> 'Mon Dec 08 2003'
> 'Mon Dec 08 2003'

hint: setlocale returns NULL on error.

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019