[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#287801: marked as done (Bug? setlocale() can't find the right data file while run through rc.d during reboot)



Your message dated Thu, 30 Dec 2004 09:43:24 -0500
with message-id <20041230144324.GA1477@nevyn.them.org>
and subject line Bug#287801: Bug? setlocale() can't find the right data file while run through rc.d during reboot
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 30 Dec 2004 06:57:24 +0000
>From geweijin@sinosoft.com.cn Wed Dec 29 22:57:24 2004
Return-path: <geweijin@sinosoft.com.cn>
Received: from (mail.sinosoft.com.cn) [219.239.36.3] 
	by spohr.debian.org with smtp (Exim 3.35 1 (Debian))
	id 1CjuFP-0000ga-00; Wed, 29 Dec 2004 22:57:23 -0800
Received: From sinosoft.com.cn[219.239.36.60] by mail.sinosoft.com.cn with Red Flag Webmail Server id 32131 for submit@bugs.debian.org; Thu Dec 30 15:17:18 2004 +0800
Message-ID: <[🔎] 41D3A6B8.6060500@sinosoft.com.cn>
Date: Thu, 30 Dec 2004 15:56:56 +0900
From: Gewj <geweijin@sinosoft.com.cn>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; zh-CN; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: zh-cn
MIME-Version: 1.0
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: Bug? setlocale() can't find the right data file while run through
 rc.d during reboot
References: <41D3A017.7040104@sinosoft.com.cn>
Content-Type: text/plain; charset=GB2312
Content-Transfer-Encoding: 7bit
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-7.0 required=4.0 tests=BAYES_01,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

Package: glibc
Version: 2.3.2-95.20.1AX


I am root and using  Linux 2.4.21-9.38AX i686(Miracle3.0) with
glibc-2.3.2-95.20.1AX


When I used the following code in a program and start it in rc3.d(such
as S99abc, the last one in the rc3.d)

#define _(String) gettext(String)

        strcpy(moname,"test");
        setlocale(LC_ALL, "ja_JP");
	bindtextdomain(moname, "/home/local/mo");
	textdomain(moname);
	
	memset(uid, 0, MAX_LINE);
	memset(lpBuffer, 0, 1000);;
	
	strcpy(uid, "0xC0040903");
	strcpy(lpBuffer, _(uid));

the dir structure of /usr/local/mo is list below:
/home/local/mo
           -|en_US
                 -|LC_MESSAGES
           -|ja_JP
             -|LC_MESSAGES


when I reboot the machine, gettext("0xC0040903") return the string
defined in en_US .mo file instead of in ja_JP .mo file.
But when I run the same program after reboot(say, through shell) ,it
return the right string that define in ja_JP .mo file.



-----Test program-------

#include <stdarg.h>
#include <dlfcn.h>
#include <ctype.h>
#include <stdio.h>
#include <syslog.h>

#include <sys/types.h>
#include <unistd.h>
#include <libintl.h>
#include <locale.h>

#define MAX_LINE 64
#define _(String) gettext(String)

int main(int argc ,char * argv[])
{
	char  moname[MAX_LINE];
	char  uid[MAX_LINE];
	char lpBuffer[1000];
	
	memset(moname,0,MAX_LINE);
	strcpy(moname,"test");

        setlocale(LC_ALL, "ja_JP");
	bindtextdomain(moname, "/home/local/mo");
	textdomain(moname);
	
	memset(uid, 0, MAX_LINE);
	memset(lpBuffer, 0, 1000);
	
	strcpy(uid, "0xC0040903");
	strcpy(lpBuffer, _(uid));
	printf("lpBuffer = %s\n",lpBuffer);
	syslog(6,"lpBuffer = %s",lpBuffer);
	
	return strlen(lpBuffer);
}





---------------------------------------
Received: (at 287801-done) by bugs.debian.org; 30 Dec 2004 14:43:32 +0000
>From drow@nevyn.them.org Thu Dec 30 06:43:32 2004
Return-path: <drow@nevyn.them.org>
Received: from nevyn.them.org [66.93.172.17] (Debian-exim)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1Ck1WW-0000gv-00; Thu, 30 Dec 2004 06:43:32 -0800
Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian))
	id 1Ck1WO-0000Vp-46; Thu, 30 Dec 2004 09:43:24 -0500
Date: Thu, 30 Dec 2004 09:43:24 -0500
From: Daniel Jacobowitz <dan@debian.org>
To: Gewj <geweijin@sinosoft.com.cn>, 287801-done@bugs.debian.org
Subject: Re: Bug#287801: Bug? setlocale() can't find the right data file while run through rc.d during reboot
Message-ID: <20041230144324.GA1477@nevyn.them.org>
References: <41D3A017.7040104@sinosoft.com.cn> <[🔎] 41D3A6B8.6060500@sinosoft.com.cn>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <[🔎] 41D3A6B8.6060500@sinosoft.com.cn>
User-Agent: Mutt/1.5.5.1+cvs20040105i
Delivered-To: 287801-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

On Thu, Dec 30, 2004 at 03:56:56PM +0900, Gewj wrote:
> Package: glibc
> Version: 2.3.2-95.20.1AX

This is not a Debian version; I recommend you report this to your
distributor instead.

I don't see anything obvious wrong with your program.


-- 
Daniel Jacobowitz



Reply to: