From akiyama@kme.mei.co.jp  Wed Dec 25 20:03:50 1996
Received: from vcgate3.mei.co.jp (vcgate3.mei.co.jp [202.32.14.53])
          by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id UAA05484
          for <freebsd-gnats-submit@freebsd.org>; Wed, 25 Dec 1996 20:03:44 -0800 (PST)
Received: by vcgate3.mei.co.jp (5.65mei1.2g/5.9:4.9:vcgate0:961204)
	id AA19564; Thu, 26 Dec 96 13:02:54 +0900
Received: by vcmei.vanc.mei.co.jp (5.65mei1.1/5.9:4.9:vcmei:961224)
	id AA24184; Thu, 26 Dec 96 13:03:15 +0900
Received: by kmegate.kme.mei.co.jp (4.1/5.5:4.6:kmegate:961205)
	id AA22725; Thu, 26 Dec 96 13:03:05 JST
Message-Id: <9612260403.AA22725@kmegate.kme.mei.co.jp>
Date: Thu, 26 Dec 96 13:03:05 JST
From: akiyama@kme.mei.co.jp
Reply-To: akiyama@kme.mei.co.jp
To: FreeBSD-gnats-submit@freebsd.org
Subject: setlocale() in libxpg4 always returns NULL with ja_JP.EUC locale.
X-Send-Pr-Version: 3.2

>Number:         2283
>Category:       misc
>Synopsis:       setlocale() in libxpg4 always returns NULL with ja_JP.EUC locale.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    ache
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 25 20:10:01 PST 1996
>Closed-Date:    Mon Dec 22 10:04:47 PST 1997
>Last-Modified:  Mon Dec 22 10:06:45 PST 1997
>Originator:     Shunsuke Akiyama
>Release:        FreeBSD 2.2-BETA_A i386
>Organization:
Kyushu Matsushita Electric Co., LTD.
>Environment:

	All FreeBSD 2.2-BETA systems using setlocale() with ja_JP.EUC
	locale.

>Description:

	setlocale() in xpg4 library always returns NULL, if locale
	parameter specified with ja_JP.EUC.

>How-To-Repeat:

	Attached sample program compiled as

	% cc -o locale -g locale.c -lxpg4

	Result:

	% ./locale
	setlocale() returns NULL

	But compiled with 2.2-ALPHA xpg4 library, this program returns:

	% ./locale
	setlocale() returns "C/ja_JP.EUC/C/C/C"

	I've tried to another locage categories, but I got same results.

	#include <stdio.h>
	#include <stdlib.h>
	#include <locale.h>

	main()
	{
		char *p;

		p = setlocale(LC_ALL, "ja_JP.EUC");
		if (p == NULL) {
			printf("setlocale() returns NULL\n");
		} else {
			printf("setlocale() returns \"%s\"\n", p);
		}
		exit(0);
	}

>Fix:
	
	N/A



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->ache 
Responsible-Changed-By: asami 
Responsible-Changed-When: Tue Mar 25 02:10:39 PST 1997 
Responsible-Changed-Why:  
Mr. Internationalization. 

From: Mike Pritchard <mpp>
To: freebsd-gnats-submit
Cc:  Subject: Re: misc/2283
Date: Tue, 25 Mar 1997 19:29:04 -0800 (PST)

 Follow up from the originator:
 
 Shunsuke Akiyama wrote:
 > Mike Pritchard <mpp@freefall.freebsd.org> writes:
 > 
 > > Are you still seeing the problem reported in your FreeBSD problem
 > > report # 2283?  Have you tried later versions of FreeBSD, such as 
 > > FreeBSD 2.2 GAMMA or FreeBSD 3.0-current?  Any other information 
 > > you could provide would be helpful.  If you are still seeing the 
 > > problem, what version of FreeBSD are you running right now?
 > 
 > I tried nearly 2.2-GAMMA (updated by CTM).
 > 
 > In point of function level, there is no problem.
 > 
 > But in point of ja_JP.EUC locale system, there are still have
 > problems.  Because setlocale() behavior had been changed between
 > 2.2-ALPHA and 2.2-BETA.  This breaks internationalized programs such
 > as XFree86 I18N clients.  I think there are same problems such as
 > ko_KR.EUC locales.
 > 
 > To solve this problems, I must apply attached patches.  But it's just
 > a kludge.
 > -- 
 > Shunsuke Akiyama
 > Kyushu Matsushita Electric Co., Ltd. Fukuoka, Japan.
 > akiyama@kme.mei.co.jp
 > 
 > ----------------------------------------------------------------------
 > --- share/timedef/data/Makefile-dist	Fri Dec 27 03:52:45 1996
 > +++ share/timedef/data/Makefile	Thu Feb 27 18:49:08 1997
 > @@ -13,6 +13,8 @@
 >  IT_LINKS =      it_CH
 >  US_LINKS =      en_AU en_CA
 >  
 > +OTHERLINKS =	ja_JP.EUC
 > +
 >  .SUFFIXES: .src .out
 >  
 >  .src.out:
 > @@ -40,6 +42,10 @@
 >  	for l in ${US_LINKS}; do \
 >  		ln -fs ../en_US.ISO_8859-1/LC_TIME \
 >  		       ${LOCALEDIR}/$$l.ISO_8859-1/LC_TIME; \
 > +	done
 > +	for l in ${OTHERLINKS}; do \
 > +		ln -fs ../en_US.ISO_8859-1/LC_TIME \
 > +		       ${LOCALEDIR}/$$l/LC_TIME; \
 >  	done
 >  
 >  .include <bsd.prog.mk>
 > --- usr.bin/colldef/data/Makefile-dist	Fri Feb 21 11:48:22 1997
 > +++ usr.bin/colldef/data/Makefile	Thu Feb 27 18:47:15 1997
 > @@ -21,6 +21,8 @@
 >  
 >  DELINKS = de_AT de_CH
 >  
 > +OTHERLINKS = ja_JP.EUC
 > +
 >  .SUFFIXES: .src .out
 >  
 >  .src.out:
 > @@ -46,6 +48,10 @@
 >  	for l in ${DELINKS}; do \
 >  		ln -fs ../de_DE.ISO_8859-1/LC_COLLATE \
 >  		       ${LOCALEDIR}/$$l.ISO_8859-1/LC_COLLATE; \
 > +	done
 > +	for l in ${OTHERLINKS}; do \
 > +		ln -fs ../lt_LN.ISO_8859-1/LC_COLLATE \
 > +		       ${LOCALEDIR}/$$l/LC_COLLATE; \
 >  	done
 >  
 >  .include <bsd.prog.mk>
 > 
State-Changed-From-To: open->analyzed 
State-Changed-By: ache 
State-Changed-When: Wed Mar 26 00:02:36 PST 1997 
State-Changed-Why:  
Nothing is broken currently, it not work just because 
Japanese time locale not exists and will not work 
until somebody submit Japanese time locale. 
State-Changed-From-To: analyzed->closed 
State-Changed-By: ache 
State-Changed-When: Mon Dec 22 10:04:47 PST 1997 
State-Changed-Why:  
Time locale submitted 
>Unformatted:
