[asterisk-dev] language setting in VM_DATE field of voicemail

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Thu Jul 19 15:56:19 CDT 2007


On Thursday 19 July 2007 08:27, clegall at proformatique.com wrote:
> Since the setlocale() syscall is not thread-safe (my first post), I
> proposed to use strftime_l().
> I was answered 2 objections there :
> * "it is not in Linux nor in FreeBSD" : my development distribution
> is Debian Linux (Etch) and this function is in libc6-dev package,
> though there is no man page for it. And it compiles OK for Asterisk.
> What about other Linux distribs ? I don't know for FreeBSD.

At the very least, it's not portable.  I've actually looked into trying
to make locale portable, by including it in Asterisk, but we'd have to
include the locale files directly, as Linux and BSD use completely
different locale databases (Linux uses a Berkeley db, BSD uses a flat
file).  Unfortunately, as stated above, setlocale(3) isn't thread-safe,
so the simplest solution will not work.

> * my "environment needs to be set correctly" :
>   If the point here is what I understand as LC_ALL, LC_TIME and LANG,
> they ARE set, to "fr_FR at euro" more precisely, and these variables
> will be used only if a function call attempts to use them.
>   So if anybody gets the point, I'd like to understand what's meant.

Sounds like your environmental variables should be set to "fr_FR"
or just "fr".  I don't know where you got the setting of "fr_FR at euro"
but I've never seen a locale file that supported that format.  On Linux,
the locales which are supported by your system are all listed as
directories in /usr/local/share/locale and /usr/share/locale.

-- 
Tilghman



More information about the asterisk-dev mailing list