Run the attached test case on WindowsNT and you will see the problem:
The test case can also be found at:
http://web-east.east/~ngthomas/jawstest/4522078/
Copy test.class and test.jar (self-signed) to a directory and run "java test"
First run it in English locale, you will see:
F:\4522708>z:\j2re1.4.0-rc\bin\java test
Current Locale: en_US
jf: java.util.jar.JarFile@601bb1
entry: META-INF/MANIFEST.MF certs: null
entry: META-INF/NGTHOMAS.SF certs: null
entry: META-INF/NGTHOMAS.DSA certs: null
entry: META-INF/ certs: null
entry: test.class certs: [Ljava.security.cert.Certificate;@6a9d42
info: [
[
Version: V1
Subject: CN=thomas ng, OU=sun, O=sun, L=burlington, ST=ma, C=us
Signature Algorithm: SHA1withDSA, OID = 1.2.840.10040.4.3
Key: Sun DSA Public Key
Parameters:DSA
p: fd7f5381 1d751229 52df4a9c 2eece4e7 f611b752 3cef4400 c31e3f80 b
512669
455d4022 51fb593d 8d58fabf c5f5ba30 f6cb9b55 6cd7813b 801d346f f26660b7
6b9950a5 a49f9fe8 047b1022 c24fbba9 d7feb7c6 1bf83b57 e7c6a8a6 150f04fb
83f6d3c5 1ec30235 54135a16 9132f675 f3ae2b61 d72aeff2 2203199d d14801c7
q: 9760508f 15230bcc b292b982 a2eb840b f0581cf5
g: f7e1a085 d69b3dde cbbcab5c 36b857b9 7994afbb fa3aea82 f9574c0b 3
078267
5159578e bad4594f e6710710 8180b449 167123e8 4c281613 b7cf0932 8cc8a6e1
3c167a8b 547c8d28 e0a3ae1e 2bb3a675 916ea37f 0bfa2135 62f1fb62 7a01243b
cca4f1be a8519089 a883dfe1 5ae59f06 928b665e 807b5525 64014c3b fecf492a
y:
961aa217 b9c5c75e 1d2126fe 063d2a7b c659794b f15ce585 735616b7 e28f5337
fc5818ed 36360b32 4cda5f62 4266d207 22f08e11 ec93e29d 457cfce1 ecb05cd7
f5e3bb96 02cebd48 13f837dd d61652a7 c0818d5a 70c92b87 4249cb9b 4090b5de
7a1e7aa1 d0494539 39e0d8f3 36ed952d a8597adb 2f6b5a9f f7d4f604 694255bb
Validity: [From: Mon Feb 05 12:24:06 EST 2001,
To: Sun May 06 13:24:06 EDT 2001]
Issuer: CN=thomas ng, OU=sun, O=sun, L=burlington, ST=ma, C=us
SerialNumber: [ 3a7ee1b6 ]
]
Algorithm: [SHA1withDSA]
Signature:
0000: 30 2C 02 14 44 AE 6B 22 FC 9D 0F D1 B0 0D 1D 71 0,..D.k".......q
0010: ED 07 75 A9 A1 A4 E6 65 02 14 2F 73 9E D9 C6 E7 ..u....e../s....
0020: 95 18 EC FB E4 D2 53 4B C2 B9 2B 94 93 E8 ......SK..+...
]
Now switch to Turkish locale:
You can do so in Control Panel->Regional Settings
Run the same test again:
F:\4522708>z:\j2re1.4.0-rc\bin\java test
Current Locale: tr_TR
jf: java.util.jar.JarFile@92d342
entry: META-INF/MANIFEST.MF certs: null
entry: META-INF/NGTHOMAS.SF certs: null
entry: META-INF/NGTHOMAS.DSA certs: null
entry: META-INF/ certs: null
entry: test.class certs: null
as you can see, JarEntry.getCertificates() returns null in Turkish locale.
I tried other locales like sk_SK or ru_RU. All works like in en_US and return correct certificate information.
This seems to happen in all versions of java, including the latest build of merlin.
F:\4522708>z:\j2re1.4.0-rc\bin\java -version
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)
The test case can also be found at:
http://web-east.east/~ngthomas/jawstest/4522078/
Copy test.class and test.jar (self-signed) to a directory and run "java test"
First run it in English locale, you will see:
F:\4522708>z:\j2re1.4.0-rc\bin\java test
Current Locale: en_US
jf: java.util.jar.JarFile@601bb1
entry: META-INF/MANIFEST.MF certs: null
entry: META-INF/NGTHOMAS.SF certs: null
entry: META-INF/NGTHOMAS.DSA certs: null
entry: META-INF/ certs: null
entry: test.class certs: [Ljava.security.cert.Certificate;@6a9d42
info: [
[
Version: V1
Subject: CN=thomas ng, OU=sun, O=sun, L=burlington, ST=ma, C=us
Signature Algorithm: SHA1withDSA, OID = 1.2.840.10040.4.3
Key: Sun DSA Public Key
Parameters:DSA
p: fd7f5381 1d751229 52df4a9c 2eece4e7 f611b752 3cef4400 c31e3f80 b
512669
455d4022 51fb593d 8d58fabf c5f5ba30 f6cb9b55 6cd7813b 801d346f f26660b7
6b9950a5 a49f9fe8 047b1022 c24fbba9 d7feb7c6 1bf83b57 e7c6a8a6 150f04fb
83f6d3c5 1ec30235 54135a16 9132f675 f3ae2b61 d72aeff2 2203199d d14801c7
q: 9760508f 15230bcc b292b982 a2eb840b f0581cf5
g: f7e1a085 d69b3dde cbbcab5c 36b857b9 7994afbb fa3aea82 f9574c0b 3
078267
5159578e bad4594f e6710710 8180b449 167123e8 4c281613 b7cf0932 8cc8a6e1
3c167a8b 547c8d28 e0a3ae1e 2bb3a675 916ea37f 0bfa2135 62f1fb62 7a01243b
cca4f1be a8519089 a883dfe1 5ae59f06 928b665e 807b5525 64014c3b fecf492a
y:
961aa217 b9c5c75e 1d2126fe 063d2a7b c659794b f15ce585 735616b7 e28f5337
fc5818ed 36360b32 4cda5f62 4266d207 22f08e11 ec93e29d 457cfce1 ecb05cd7
f5e3bb96 02cebd48 13f837dd d61652a7 c0818d5a 70c92b87 4249cb9b 4090b5de
7a1e7aa1 d0494539 39e0d8f3 36ed952d a8597adb 2f6b5a9f f7d4f604 694255bb
Validity: [From: Mon Feb 05 12:24:06 EST 2001,
To: Sun May 06 13:24:06 EDT 2001]
Issuer: CN=thomas ng, OU=sun, O=sun, L=burlington, ST=ma, C=us
SerialNumber: [ 3a7ee1b6 ]
]
Algorithm: [SHA1withDSA]
Signature:
0000: 30 2C 02 14 44 AE 6B 22 FC 9D 0F D1 B0 0D 1D 71 0,..D.k".......q
0010: ED 07 75 A9 A1 A4 E6 65 02 14 2F 73 9E D9 C6 E7 ..u....e../s....
0020: 95 18 EC FB E4 D2 53 4B C2 B9 2B 94 93 E8 ......SK..+...
]
Now switch to Turkish locale:
You can do so in Control Panel->Regional Settings
Run the same test again:
F:\4522708>z:\j2re1.4.0-rc\bin\java test
Current Locale: tr_TR
jf: java.util.jar.JarFile@92d342
entry: META-INF/MANIFEST.MF certs: null
entry: META-INF/NGTHOMAS.SF certs: null
entry: META-INF/NGTHOMAS.DSA certs: null
entry: META-INF/ certs: null
entry: test.class certs: null
as you can see, JarEntry.getCertificates() returns null in Turkish locale.
I tried other locales like sk_SK or ru_RU. All works like in en_US and return correct certificate information.
This seems to happen in all versions of java, including the latest build of merlin.
F:\4522708>z:\j2re1.4.0-rc\bin\java -version
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)
- duplicates
-
JDK-4522078 On Wintel environment J WS can't download apps if system locale is Turkish
- Closed
- relates to
-
JDK-6208680 Doc: Clarify issues with toLowerCase/toUpperCase and Turkish
- Resolved