List Info

Thread: Wrong locales in JDK 1.6 (patchset 3)




Wrong locales in JDK 1.6 (patchset 3)
country flaguser name
Germany
2007-12-29 16:00:23
Hi,

I've run into a problem with localization in jdk1.6
(patchset 3) at least on
FreeBSD 6.2/AMD64 and 7.0/AMD64. With jdk 1.6
Locale.getAvailableLocales()
returns only 3 locales: "ben", "arn",
"sun/text/resources/".

Yeah that looks buggy so i started so search and found that
sun.util.LocaleDataMetaInfo.getSupportedLocaleString("s
un.text.resources.FormatData")
returns "  ben sun/text/resources/ |  arn
sun/text/resources/ " which is a
formatted string with all available locales that were
hardcoded/replaced at
build time so the cause is somewhere in the build scripts.

That string is build by j2se/make/java/java/localegen.sh and
genlocales.gmk
but i haven't yet found the bug itself.


Can anyone confirm that this is a bug?



import java.util.Locale;
import sun.util.LocaleDataMetaInfo;

public class LocaleDebug
{
	public static void main(String[] args)
	{
		Locale[] locales = Locale.getAvailableLocales();

		for(int i=0; i < locales.length; i++)
			System.out.println(locales[i]);

		System.out.println("sun.text.resources.FormatData
-> " +
		LocaleDataMetaInfo.getSupportedLocaleString("sun.text
.resources.FormatData"));
	}
}


_______________________________________________
freebsd-javafreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java

To unsubscribe, send any mail to
"freebsd-java-unsubscribefreebsd.org"

Re: Wrong locales in JDK 1.6 (patchset 3)
user name
2007-12-29 17:47:25
I get the same output as you with my build of JDK 1.6 p3.  I
get the 
expected output with similar code on my Windows box.  I also
get the 
expected result if I remove references to
sun.util.LocaleDataMetaInfo and 
compile and run it with my old JDK 1.5... so it looks like a
flaw in the 
1.6p3 build.

   Nick

On Sat, 29 Dec 2007, Bernhard Froehlich wrote:

> Hi,
> 
> I've run into a problem with localization in jdk1.6
(patchset 3) at least on
> FreeBSD 6.2/AMD64 and 7.0/AMD64. With jdk 1.6
Locale.getAvailableLocales()
> returns only 3 locales: "ben",
"arn", "sun/text/resources/".
> 
> Yeah that looks buggy so i started so search and found
that
>
sun.util.LocaleDataMetaInfo.getSupportedLocaleString("s
un.text.resources.FormatData")
> returns "  ben sun/text/resources/ |  arn
sun/text/resources/ " which is a
> formatted string with all available locales that were
hardcoded/replaced at
> build time so the cause is somewhere in the build
scripts.
> 
> That string is build by
j2se/make/java/java/localegen.sh and genlocales.gmk
> but i haven't yet found the bug itself.
> 
> 
> Can anyone confirm that this is a bug?

-- 
"Courage isn't just a matter of not being frightened,
you know. It's being
 afraid and doing what you have to do anyway."
   Doctor Who - Planet of the Daleks
This message has been brought to you by Nick Johnson 2.3b1
and the number 6.
http://healerNick.com/ 
     http://morons.org/    
   http://spatula.net/
_______________________________________________
freebsd-javafreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java

To unsubscribe, send any mail to
"freebsd-java-unsubscribefreebsd.org"

Re: Wrong locales in JDK 1.6 (patchset 3)
country flaguser name
New Zealand
2007-12-30 02:04:23
On Sat, Dec 29, 2007 at 11:00:23PM +0100, Bernhard Froehlich
wrote:
> Hi,
> 
> I've run into a problem with localization in jdk1.6
(patchset 3) at least on
> FreeBSD 6.2/AMD64 and 7.0/AMD64. With jdk 1.6
Locale.getAvailableLocales()
> returns only 3 locales: "ben",
"arn", "sun/text/resources/".

This also happens on 6-STABLE/i386 and 7-STABLE/i386.

Cheers.
-- 
Jonathan Chen <joncchen.org.nz>
------------------------------------------------------------
----------
                "If everything's under control, you're
going too slow"
                                                      -
Mario Andretti
_______________________________________________
freebsd-javafreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java

To unsubscribe, send any mail to
"freebsd-java-unsubscribefreebsd.org"

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )