From owner-freebsd-java@FreeBSD.ORG Sat Dec 29 22:30:24 2007 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C59516A46C for ; Sat, 29 Dec 2007 22:30:24 +0000 (UTC) (envelope-from decke@bluelife.at) Received: from de-01.itac.at (de-01.itac.at [213.155.82.138]) by mx1.freebsd.org (Postfix) with ESMTP id 2DC5313C4CE for ; Sat, 29 Dec 2007 22:30:24 +0000 (UTC) (envelope-from decke@bluelife.at) Received: from localhost ([127.0.0.1] helo=webmail.itac.at) by de-01.itac.at with esmtp (Exim 4.52) id 1J8jjD-0005xf-1a for freebsd-java@freebsd.org; Sat, 29 Dec 2007 23:00:23 +0100 Received: from 85.90.150.9 (SquirrelMail authenticated user decke@bluelife.at) by webmail.itac.at with HTTP; Sat, 29 Dec 2007 23:00:23 +0100 (CET) Message-ID: <58395.85.90.150.9.1198965623.squirrel@webmail.itac.at> Date: Sat, 29 Dec 2007 23:00:23 +0100 (CET) From: "Bernhard Froehlich" To: freebsd-java@freebsd.org User-Agent: SquirrelMail/1.4.4 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: Wrong locales in JDK 1.6 (patchset 3) X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Dec 2007 22:30:24 -0000 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("sun.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")); } }