[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Question about KLocale in KDE 2
From:       Hans Petter Bieker <bieker () stud ! ntnu ! no>
Date:       2000-02-04 19:11:02
[Download RAW message or body]

On Fri, 4 Feb 2000, Andre Charbonneau wrote:

> Why did these POSIX compliant functions where not used inside the
> KLocale methods?

localconv doesn't really work on some systems. E.g. setlocale(3) on
{Free,Open}BSD states this:
     The current implementation supports only the "C" and "POSIX" locales for
     all but the LC_COLLATE, LC_CTYPE, and LC_TIME categories.

It provides all the functions we need. How do you use strftime() to create
a long date? I guess you would have to use "%c", which is really (and
isn't really localized .. it uses a format similar to asctime(3)). As a
result you would have to create a date base for the date formats.

if you use setlocale(LC_NUMERIC, my_locale), sprintf would always be
localized. Parsing of config files etc would be broken. As a
result you would have to use setlocale(LC_NUMERIC, my_locale) before each
call to sprintf() and then set it back.

And for money there are POSIX functions.

Other drawback would be that strings would look different depending of the
operating system you are runing. I'm not sure how it would work with
unicodes.

-bieker-

Norwegian University of Science and Technology, Engineering Cybernetics
                 bieker@stud.ntnu.no / bieker@kde.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic