-
Bug
-
Resolution: Fixed
-
P4
-
1.4.0
-
beta
-
x86
-
windows_2000
Swing and swing demos should not use the default encoding version of
InputStreamReader() constructor when reading ASCI files. This completely breaks
Swing and all Swing demos on Hindi locale, since Hindi locale uses
utf-16le encoding as default. Anywhere where the default encoding version of
InputSteamReader is used with ASCI files, one should make a change
and explicitely specify the encoding to be Cp1252 or UTF-8.
To find out instances of this, put Thread.dumpStack() into the default
encoding version of InputStreamReader() and run Swing demos. With
SwingSet2 it produces:
at java.lang.Thread.dumpStack(Thread.java:1105)
at java.io.InputStreamReader.<init>(InputStreamReader.java:108)
at javax.swing.text.html.HTMLEditorKit.getStyleSheet(HTMLEditorKit.java:
359)
at javax.swing.text.html.HTMLEditorKit.createDefaultDocument(HTMLEditorK
it.java:188)
at javax.swing.JEditorPane.setEditorKit(JEditorPane.java:943)
at javax.swing.JEditorPane.setContentType(JEditorPane.java:869)
at javax.swing.JEditorPane.<init>(JEditorPane.java:267)
at SwingSet2.initializeDemo(SwingSet2.java:269)
at SwingSet2.<init>(SwingSet2.java:205)
at SwingSet2.main(SwingSet2.java:228)
java.lang.Exception: Stack trace
at java.lang.Thread.dumpStack(Thread.java:1105)
at java.io.InputStreamReader.<init>(InputStreamReader.java:108)
at DemoModule.loadSourceCode(DemoModule.java:169)
at DemoModule.<init>(DemoModule.java:105)
at InternalFrameDemo.<init>(InternalFrameDemo.java:101)
at SwingSet2.preloadFirstDemo(SwingSet2.java:559)
at SwingSet2.<init>(SwingSet2.java:206)
at SwingSet2.main(SwingSet2.java:228)
java.lang.Exception: Stack trace
at java.lang.Thread.dumpStack(Thread.java:1105)
"swinghindi" 38 lines, 1950 characters
at java.io.InputStreamReader.<init>(InputStreamReader.java:108)
at DemoModule.loadSourceCode(DemoModule.java:169)
at DemoModule.<init>(DemoModule.java:105)
at ButtonDemo.<init>(ButtonDemo.java:98)
at sun.reflect.GeneratedConstructorAccessor109.newInstance(Unknown Sourc
e)
at java.lang.reflect.Constructor.newInstance(Constructor.java:263)
at SwingSet2.loadDemo(SwingSet2.java:695)
at SwingSet2.loadDemos(SwingSet2.java:83)
at SwingSet2$DemoLoadThread.run(SwingSet2.java:1205)
java.lang.Exception: Stack trace
at java.lang.Thread.dumpStack(Thread.java:1105)
at java.io.InputStreamReader.<init>(InputStreamReader.java:108)
###@###.### 10/13/04 17:55 GMT
InputStreamReader() constructor when reading ASCI files. This completely breaks
Swing and all Swing demos on Hindi locale, since Hindi locale uses
utf-16le encoding as default. Anywhere where the default encoding version of
InputSteamReader is used with ASCI files, one should make a change
and explicitely specify the encoding to be Cp1252 or UTF-8.
To find out instances of this, put Thread.dumpStack() into the default
encoding version of InputStreamReader() and run Swing demos. With
SwingSet2 it produces:
at java.lang.Thread.dumpStack(Thread.java:1105)
at java.io.InputStreamReader.<init>(InputStreamReader.java:108)
at javax.swing.text.html.HTMLEditorKit.getStyleSheet(HTMLEditorKit.java:
359)
at javax.swing.text.html.HTMLEditorKit.createDefaultDocument(HTMLEditorK
it.java:188)
at javax.swing.JEditorPane.setEditorKit(JEditorPane.java:943)
at javax.swing.JEditorPane.setContentType(JEditorPane.java:869)
at javax.swing.JEditorPane.<init>(JEditorPane.java:267)
at SwingSet2.initializeDemo(SwingSet2.java:269)
at SwingSet2.<init>(SwingSet2.java:205)
at SwingSet2.main(SwingSet2.java:228)
java.lang.Exception: Stack trace
at java.lang.Thread.dumpStack(Thread.java:1105)
at java.io.InputStreamReader.<init>(InputStreamReader.java:108)
at DemoModule.loadSourceCode(DemoModule.java:169)
at DemoModule.<init>(DemoModule.java:105)
at InternalFrameDemo.<init>(InternalFrameDemo.java:101)
at SwingSet2.preloadFirstDemo(SwingSet2.java:559)
at SwingSet2.<init>(SwingSet2.java:206)
at SwingSet2.main(SwingSet2.java:228)
java.lang.Exception: Stack trace
at java.lang.Thread.dumpStack(Thread.java:1105)
"swinghindi" 38 lines, 1950 characters
at java.io.InputStreamReader.<init>(InputStreamReader.java:108)
at DemoModule.loadSourceCode(DemoModule.java:169)
at DemoModule.<init>(DemoModule.java:105)
at ButtonDemo.<init>(ButtonDemo.java:98)
at sun.reflect.GeneratedConstructorAccessor109.newInstance(Unknown Sourc
e)
at java.lang.reflect.Constructor.newInstance(Constructor.java:263)
at SwingSet2.loadDemo(SwingSet2.java:695)
at SwingSet2.loadDemos(SwingSet2.java:83)
at SwingSet2$DemoLoadThread.run(SwingSet2.java:1205)
java.lang.Exception: Stack trace
at java.lang.Thread.dumpStack(Thread.java:1105)
at java.io.InputStreamReader.<init>(InputStreamReader.java:108)
###@###.### 10/13/04 17:55 GMT
- relates to
-
JDK-4667175 Cannot parsing java.policy which includes some 2 bytes char
-
- Closed
-
-
JDK-4310802 HTMLEditorKit does not parse TAGs for Cp037 character encoding
-
- Closed
-