Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4221476
Votes 4
Synopsis Croatian file.encoding is wrong on Windows
Category java:char_encodings
Reported Against 1.2.2 , 1.1.7b
Release Fixed 1.3.1_04, 1.4(merlin-beta) (Bug ID:2025910)
State 10-Fix Delivered, bug
Priority: 4-Low
Related Bugs
Submit Date 18-MAR-1999
Description




This is from  xxxxx , a Java licensee.  
The  xxxxx  bug number is 761511.  
  
This bug occurs with JDK 1.1.7B and JDK1.2. Please examine it ASAP.

The Croatian file.encoding property is Cp1252 in JDK1.1.7.  Cp1252 is a Latin1
code page and Croatian is a Latin2 language.  The file.encoding should be
Cp1250.  The file.encoding is a Java system property and can be viewed via
System.getProperty("file.encoding").  This encoding is still a problem in JDK1.2FCS.  

To fix this problem, the encoding_names section should be 
changed in locale_str.h file to:
static char *encoding_names[] = {
    "ar", "Cp1256",
    "be", "Cp1251",
    "bg", "Cp1251",
    "cs", "Cp1250",
    "el", "Cp1253",
    "et", "Cp1257",
    "iw", "Cp1255",
    "hr", "Cp1250", /*Added for missing Croatian support*/
    "hu", "Cp1250",
    "ja", "MS932",
    "ko", "MS949",
    "lt", "Cp1257",
    "lv", "Cp1257",
    "mk", "Cp1251",
    "pl", "Cp1250",
    "ro", "Cp1250",
    "ru", "Cp1251",
    "sh", "Cp1250",
    "sk", "Cp1250",
    "sl", "Cp1250",
    "sq", "Cp1250",
    "sr", "Cp1251",
    "th", "MS874",
    "tr", "Cp1254",
    "uk", "Cp1251",
    "vn", "Cp1258", /*Added for missing Vietnamese support*/
    "zh", "GBK",
    "zh_TW", "MS950",
    "",
};
(Review ID: 55713)
======================================================================
Work Around




On Windows NT the font.properties.cs file from JDK 1.1 will do the job. This workaround DOES NOT work on Windows 95/98.
(Review ID: 94926)
======================================================================
Evaluation
[  xxxxx@xxxxx   2000-02-17]
will add Croatian->cp1250 entry into the lookup table as suggested, target
for merlin.

[  xxxxx@xxxxx   2000-02-17]
new bug#4319877 has been created to seperated the font.properties file
related problem.
Comments
  
  Include a link with my name & email   

Submitted On 08-DEC-1999
malamut
I think I have a workaround for the bug mentioned above by review ID 94926
(although this is not strictly the original bug with the number 761511
mentioned far above).
Change the (US american) file font.properties as follows:
1. replace all occurrences of ANSI_CHARSET by EASTEUROPE_CHARSET.
2. replace all occurrences of Cp1252 by Cp1250.
3. delete all exclusions.
This works for me on a Czech Windows NT 4.0. I can't test other configurations,
but I don't see why this shouldn't work on any Windows 95/98/NT in non-cyrillic
eastern Europe. It would be nice to know whether this works for others, too.
I tested this with the SDK 1.2.2.
Please note that this is only a workaround which has drawbacks: no chars
outside codepage 1250 can be displayed. This is not a limitation of Windows and
should be fixed in the JRE. Anyway, all chars should be available without
meddeling with fonts.properties, as it is the case on the OS/2 JVM.
NOTE: there are usually several copies of font.properties on the system (in
different directories). Make sure to change them all.



PLEASE NOTE: JDK6 is formerly known as Project Mustang