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: Sun, 7 Dec 2003 16:36:45 -0800 From: Yitzchak Scott-Thoennes 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> <3FD3C2A0 DOT 4050208 AT terra DOT com DOT br> Mime-Version: 1.0 Content-Type: text/plain; charset=unknown-8bit Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 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/