Puzzle about the setlocale Function in Miracle3.0

From: Gewj
Date: Wed Dec 29 2004 - 07:19:30 EST



There has a quite strange thing about the setlocale function
in Miracle3.0
(Linux 2.4.21-9.38AX #1 Wed Nov 10 22:00:41 EST 2004 i686
glibc-common-2.3.2-95.20.1AX )

I used the following code in a daemon program and start it in rc3.d

setlocale(LC_ALL, "ja_JP");
bindtextdomain("express", "/usr/local/mo");
textdomain("express");
//get string from .mo file according to the locale set
strcpy(myString,gettext("MyID"));

the dir structure of /usr/local/mo is list below:

/usr/local/mo
-|en_US
-|LC_MESSAGES
-|ja_JP
-|LC_MESSAGES


where I reboot the machine, gettext("MyID") return its string defined in
en_US .mo file instead of in ja_JP .mo file
But where I restart the same daemon program after reboot , the same
program works OK.

Can anyone show me some tips to the reason?

thanks in advance.

Gewj.



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/