๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #6297

Re: strftime %#c not working with swedish locale

#6297
From: Darko Miletic
Date: Tue, 24 May 2005 15:57
32 lines
2123 bytes
Fredrik Bergstrรถm wrote:
> strftime %#c gives strange output when compiling in Borland Compilers, I have tried BCC55, Borland BuilderX and Borland C++ Buider 6 and I get the same output on them all.
> 
> I have forced swedish locale.
> 
> Output when compiled with MS Compiler:
> den 21 maj 2005 15:16:32
> 
> Output when compiled with Borland Compiler:
> 21en 21 maj 2005 15:17:56

This is a bug in Borland C RTL. Implementation of function that parses 
names of locales is flawed.

You have 3 options here:

1. To fix RTL and than to recompile it. It is possible provided that you 
have Prof. or Ent. version.
2. To write your own functions using straight windows API.
3. To use BOOST

To fix RTL take a look at <bcb folder>\source\rtl\locale . The file in 
question is locale.c and the flawed function is
LCID _getLocale(LPWIN32LOCALE _locale, LPSTR LocaleName)

There may be even other problems with this implementation. I stopped 
looking once I saw the mess inside.

Darko
Technical Details
Message-ID: <42934ef6$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news3.google.com!news.glorb.com!txtfeed1.tudelft.nl!tudelft.nl!txtfeed2.tudelft.nl!feeder.xsnews.nl!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <428f3697$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,dff135440cddd34d
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII
Date: Tue, 24 May 2005 12:57:43 -0300
From: Darko Miletic <kiklop@fibertel.com.ar>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: strftime %#c not working with swedish locale
References: <428f3697$1@newsgroups.borland.com>
In-Reply-To: <428f3697$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-2; format=flowed
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: 201.252.47.39
Message-ID: <42934ef6$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1116950262 201.252.47.39 (24 May 2005 08:57:42 -0700)
Lines: 32
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news3.google.com!news.glorb.com!txtfeed1.tudelft.nl!tudelft.nl!txtfeed2.tudelft.nl!feeder.xsnews.nl!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail