public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Gewj <geweijin@sinosoft.com.cn>
To: linux-kernel@vger.kernel.org
Subject: Puzzle about the setlocale Function in Miracle3.0
Date: Wed, 29 Dec 2004 21:17:32 +0900	[thread overview]
Message-ID: <41D2A05C.5020105@sinosoft.com.cn> (raw)


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.




                 reply	other threads:[~2004-12-29 12:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41D2A05C.5020105@sinosoft.com.cn \
    --to=geweijin@sinosoft.com.cn \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox