This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

problem setlocale in latest glibc and hope locale.alias


HI!

I didn't use japanese locale till recently.
some previous version of glibc was OK. 
which is 2.2.93 ??? forgot it.

latest glibc has setlocale problem.
Please look at setlocale function.
Glibc Compilation,mack check is OK.

Anther one, I hope.
Our japanese would like to use ja_JP.eucJP
So add this alias patch.
SUPPORTED has ja_JP.EUC-JP which it isn't related from japanese or japanese.euc.

2002-10-21  Kaoru Fukui  <k_fukui@highway.ne.jp>

	* intl/locale.alias:
	  Add alias ja_JP.eucJP,ja_JP.eucjp,ja_JP.euc_JP to ja_JP.EUC-JP

diff -urN base/intl/locale.alias fixed/intl/locale.alias
--- base/intl/locale.alias	Thu Jul 12 14:45:31 2001
+++ fixed/intl/locale.alias	Tue Oct 22 01:59:30 2002
@@ -49,6 +49,9 @@
 hungarian       hu_HU.ISO-8859-2
 icelandic       is_IS.ISO-8859-1
 italian         it_IT.ISO-8859-1
+ja_JP.eucJP	ja_JP.EUC-JP
+ja_JP.eucjp	ja_JP.EUC-JP
+ja_JP.euc_JP	ja_JP.EUC-JP
 japanese	ja_JP.eucJP
 japanese.euc	ja_JP.eucJP
 ja_JP		ja_JP.eucJP


----------
 Kaoru
========================
[root@g4mpkfukui root]# fr
Warning: locale not supported by C library, locale unchanged
Couldn't set locale: ja_JP.eucJP,ja_JP.ujis,ja_JP.EUC,japanese.euc,Japanese-EUC,ja,japan


[root@g4mpkfukui wk]# locale
LANG=ja_JP.EUC-JP
LC_CTYPE="ja_JP.EUC-JP"
LC_NUMERIC="ja_JP.EUC-JP"
LC_TIME="ja_JP.EUC-JP"
LC_COLLATE="ja_JP.EUC-JP"
LC_MONETARY="ja_JP.EUC-JP"
LC_MESSAGES="ja_JP.EUC-JP"
LC_PAPER="ja_JP.EUC-JP"
LC_NAME="ja_JP.EUC-JP"
LC_ADDRESS="ja_JP.EUC-JP"
LC_TELEPHONE="ja_JP.EUC-JP"
LC_MEASUREMENT="ja_JP.EUC-JP"
LC_IDENTIFICATION="ja_JP.EUC-JP"
LC_ALL=                     <<<<------------ nothing

[root@g4mpkfukui wk]# ./check_setlocale en_US.ISO-8859-1
cannot set en_US.ISO-8859-1 locale
[root@g4mpkfukui wk]# 

[root@g4mpkfukui wk]# ./check_setlocale ja_JP.EUC-JP    
cannot set ja_JP.EUC-JP locale
[root@g4mpkfukui wk]# 

--------- my check_setlocale ---------------
#include <ctype.h>
#include <stdio.h>
#include<locale.h>

int main (int ac, char **av)
{
	char *ret_name;

	if (ac!=2){
	 printf ("Use #setlocale  localname{example:en_US} as LC_ALL\n");
	 printf (" you put setlocale  %s as LC_ALL  \n",av[1]);
	 return 1;
	}

	if(ret_name=setlocale(LC_ALL,av[1]) == NULL ){
		printf("cannot set %s locale\n",av[1]);
		return 1;			
	};
	printf("%s\n",ret_name);
	printf("OK\n");

	return 0;
}



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]