JDK-6896693 : [fr] keytool: wrong message format in fr locale
  • Type: Bug
  • Component: globalization
  • Sub-Component: translation
  • Affected Version: 6u16
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: linux
  • CPU: x86
  • Submitted: 2009-10-30
  • Updated: 2011-02-16
  • Resolved: 2010-10-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7
6u23 b02Fixed 7Fixed
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) 64-Bit Server VM (build 14.2-b01, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
openSUSE 11.1 x86-64, Linux xxxx 2.6.27.7-9-default #1 SMP 2008-12-04 18:10:04 +0100 x86_64 x86_64 x86_64 GNU/Linux

A DESCRIPTION OF THE PROBLEM :
Messages are incorrectly formated in french locale.
Apostrophes (i.e. quote characters: ' ) don't show up where they should and numbers in curly braces will appear instead of values after that position. The curly braces are the format specifiers of the MessageFormat format string, and it seems that the previous apostrophe is escaping them. Instead the quote should have been doubled to escape itself.
This doesn't happen in US locale.
It seems to be a regression of bugfix 6435443.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Just go into the French locale and print any keytool message with a localized value.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The ouput in US locale (as expected) :
$ export LC_CTYPE=en_US.UTF-8
$ keytool -list -keystore keystore -v -alias xxxxx
Enter keystore password:

Alias name: xxxxx
Creation date: Apr 29, 2008
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=xxx, OU=xxx, O=xxx, C=FR
Issuer: CN=xxx, OU=xxx, O=xxx, C=FR
Serial number: 48172663
Valid from: Tue Apr 29 15:45:07 CEST 2008 until: Mon Jul 28 15:45:07 CEST 2008
Certificate fingerprints:
         MD5:  2A:6B:0C:08:97:70:BD:21:E4:64:F7:41:BA:58:83:CC
         SHA1: 10:68:D9:A5:FC:68:29:AC:81:00:08:F2:92:7B:35:79:B7:82:F3:2B
         Signature algorithm name: MD5withRSA
         Version: 1

ACTUAL -
The ouput in french locale. Note some quote characters are missing (e.g. in "Type d'entr��e") and some values don't appear and are replaced by curly braced numbers.
$ export LC_CTYPE=fr_FR.UTF-8
$ keytool -list -keystore keystore -v -alias xxxxx
Tapez le mot de passe du Keystore :

Nom d'alias : xxxxx
Date de cr��ation : 29 avr. 2008
Type dentr��e : {0}
Longueur de cha��ne du certificat : 1
Certificat[1]:
Propri��taire : CN=xxx, OU=xxx, O=xxx, C=FR
��metteur : CN=xxx, OU=xxx, O=xxx, C=FR
Num��ro de s��rie : 48172663
Valide du : Tue Apr 29 15:45:07 CEST 2008 au : Mon Jul 28 15:45:07 CEST 2008
Empreintes du certificat :
         MD5 :  2A:6B:0C:08:97:70:BD:21:E4:64:F7:41:BA:58:83:CC
         SHA1 : 10:68:D9:A5:FC:68:29:AC:81:00:08:F2:92:7B:35:79:B7:82:F3:2B
         Nom de lalgorithme de signature : {7}
         Version : {8}


REPRODUCIBILITY :
This bug can be reproduced always.

Release Regression From : 6
The above release value was the last known release where this 
bug was not reproducible. Since then there has been a regression.

Comments
EVALUATION Messsages used in messageformat needs to have double aposprophies. In 6435443, we only fixed the string on which problem was reported, rather than checking the whole file. This time,the problem is at key "*PATTERN* printX509Cert" This time, we will check whole file, j2se/src/share/classes/sun/security/util/Resources_fr.java, to make sure no such problem happens anywhere in the resource file. We also need to double check spanish and Italian translation. This is not a regression, as fix in 6435443 is still valid, but 6435443 is only a partial fix.
02-11-2009