-
Bug
-
Resolution: Fixed
-
P2
-
orion3windows, arrow, 1.1, 1.1.4, 1.1.7, 1.2.1, 1.3.0, 1.3.1, 5.0, 6, 6u25, 7
-
b28
-
generic, x86
-
solaris_2.5, windows, windows_95, windows_98, windows_nt, windows_2000, windows_2003, windows_xp, windows_2008, windows_7
-
Not verified
The VM picks the ANSI codepage for the default on startup. This means that System.out.println() uses the wrong codepage when it is attached to a DOS console window.
The following will demonstrate:
// Run this on a US version of Windows
import java.awt.*;
import com.sun.java.swing.*;
import java.io.*;
public class HelloWorldFrame extends JFrame
{
JButton jButton1 = new JButton();
public HelloWorldFrame()
{
this.getContentPane().add(jButton1, BorderLayout.CENTER);
}
public static void main(String[] args) throws Exception
{
HelloWorldFrame helloWorldFrame1 = new HelloWorldFrame();
//String umlaut = "÷õ³ÍŽ›œ";
String umlaut = "\u00f6\u00e4\u00fc\u00d6\u00c4\u00dc\u00df";
helloWorldFrame1.jButton1.setText(umlaut);
System.out.println (umlaut);
PrintWriter out = new PrintWriter( new OutputStreamWriter(System.out,
"Cp437"),
true );
// Does the right thing
out.println(umlaut);
// Does the wrong thing
System.out.println(umlaut);
helloWorldFrame1.pack();
helloWorldFrame1.show();
}
}
brian.beck@Eng 1998-06-29
- duplicates
-
JDK-4229169 Implementation Bug for "Locale.FRANCE"
-
- Closed
-
-
JDK-4418200 Currency formatting for some locales produces question marks
-
- Closed
-
-
JDK-5046759 Corrupted localized chars in CLI
-
- Closed
-
-
JDK-7022409 Garchars displayed in the output of java in es locale.
-
- Closed
-
-
JDK-7022867 [es] output character doesn't display correctly on Spanish Windows.
-
- Closed
-
-
JDK-7022883 [sv_SE] output character doesn't display correctly on Swedish Windows.
-
- Closed
-
-
JDK-7022889 [de] output character doesn't display correctly on German Windows.
-
- Closed
-
-
JDK-4279804 Display of Group 1 National characters in CP 850 doesn't work
-
- Closed
-
-
JDK-4369481 file.encoding CP1252 improperly displays \u00b2 on Windows
-
- Closed
-
-
JDK-6507013 Greek characters showing up in the french canadian locale
-
- Closed
-
-
JDK-4094370 System streams should use GetConsoleCP and converter
-
- Closed
-
- relates to
-
JDK-4511987 Swedish localization uses incorrect terms
-
- Resolved
-
-
JDK-4310713 Swedish characters and System.out
-
- Closed
-