lkml.org 
[lkml]   [2004]   [Dec]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectPuzzle about the setlocale Function in Miracle3.0

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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:09    [W:0.028 / U:2.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site