* Puzzle about the setlocale Function in Miracle3.0
@ 2004-12-29 12:17 Gewj
0 siblings, 0 replies; only message in thread
From: Gewj @ 2004-12-29 12:17 UTC (permalink / raw)
To: linux-kernel
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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-12-29 12:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-29 12:17 Puzzle about the setlocale Function in Miracle3.0 Gewj
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox