bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LC_CTYPE implementation help


From: Aragon Gouveia
Subject: Re: LC_CTYPE implementation help
Date: Wed, 27 Aug 2008 21:08:39 +0200
User-agent: Mutt/1.4i

Hi Bruno,

| By Bruno Haible <address@hidden>
|                                          [ 2008-08-27 12:03 +0200 ]
> Character types and isalnum() implementations are part of the locale.
> This is a set of files, usually stored in /usr/lib/locale/ and used by the
> libc at runtime. On glibc systems a localizing person can create new locales
> by using the 'localedef' program. But this step is part of creating support
> for a new language or territory in glibc, not the job that an average
> translator does. Anyway, for reference about the glibc locale format:
>   - http://people.debian.org/~barbier/talks/debconf5/glibc-locale_handout.pdf
>   - look also at the existing locale files in /usr/share/i18n/locales/
> 
> gettext is not used to implement locales. Locales are not specified in PO 
> files.

Thanks a lot.  It makes much more sense now.  At first I was under the
impression gettext handled everything, but I understand now it only handles
messages.

So I take it this means that if one were writing a locale aware application,
the application's ability to function predictability is very much upto the
platform and system on which it runs?  ie. one can't rely on just ensuring
gettext is installed correctly...


> And be aware that the <ctype.h> functions are meaningless in multibyte locales

Does this apply to all systems?  I use FreeBSD primarily, and their locales
are named, for example, "ja_JP.UTF-8" - this makes me think the FreeBSD
ctype functions will be multibyte aware...

edit: just noticed FreeBSD has ctype functions like iswalnum() for handling
"wide characters" and are declared in wctype.h.  Cool! :)

http://www.freebsd.org/cgi/man.cgi?query=iswalnum&apropos=0&sektion=0&manpath=FreeBSD+7.0-RELEASE&format=html


Thanks,
Aragon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]