[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] Enabling iconv charset provider
From: |
Mark Wielaard |
Subject: |
[cp-patches] Enabling iconv charset provider |
Date: |
Fri, 29 Apr 2005 16:37:07 +0200 |
Hi,
This patch makes it easy to enable and experiment with the new iconv
charset provider.
2005-04-29 Sven de Marothy <address@hidden>
Mark Wielaard <address@hidden>
* java/nio/charset/Charset.java (defaultCharset): Use
SystemProperties.
(provider): Check gnu.classpath.nio.charset.provider.iconv system
property and return the IconvProvider when set.
* NEWS: Document new character encoder framework.
Committed.
Enabling the IconvProvider does show a few regressions with mauve so I
have not enabled it by default yet. These are probably all simple
non-standard charset alias names missing from iconv.
-PASS: gnu.testlet.java.lang.String.getBytes13: String.getBytes("UTF-16")
(number 1)
-PASS: gnu.testlet.java.lang.String.getBytes13: String.getBytes("UnicodeBig")
(number 1)
+FAIL: gnu.testlet.java.lang.String.getBytes13: String.getBytes("UTF-16")
(number 1)
+FAIL: gnu.testlet.java.lang.String.getBytes13: String.getBytes("UnicodeBig")
(number 1)
PASS: gnu.testlet.java.lang.String.getBytes13:
String.getBytes("UnicodeBigUnmarked") (number 1)
-PASS: gnu.testlet.java.lang.String.getBytes13:
String.getBytes("UnicodeLittle") (number 1)
+FAIL: gnu.testlet.java.lang.String.getBytes13:
String.getBytes("UnicodeLittle") (number 1)
-PASS: gnu.testlet.java.nio.charset.Charset.forName2: Charset
'IsO_646.IRV:1991' supported (number 1)
+FAIL: gnu.testlet.java.nio.charset.Charset.forName2: Charset
'IsO_646.IRV:1991' supported (number 1)
About the release. I have dragged into a fight with cvs checkouts
through external cvs with eclipse. That was a mistake. Eclipse won :{
And as it turned out this wasn't a regression since 0.14 also had an
issue here. Sorry for fighting windmills.
There is one issue I want to investigate and fix before the release with
FileInputStream not always throwing FileNotFoundException when
appropriate. After that it is just updating docs and release!
Cheers,
Mark
Index: NEWS
===================================================================
RCS file: /cvsroot/classpath/classpath/NEWS,v
retrieving revision 1.73
diff -u -r1.73 NEWS
--- NEWS 28 Apr 2005 21:36:09 -0000 1.73
+++ NEWS 29 Apr 2005 14:32:34 -0000
@@ -1,7 +1,37 @@
-New in release 0.15 ()
+New in release 0.15 (Apr 29, 2005)
+
+* The old character encoding framework (gnu.java.io.EncodingManager)
+has been replaced by a system based completely on nio.charset
+providers. Many converters have been added, both the io, lang and nio
+frameworks now use the same set of converters and the whole character
+stream framework (Readers and Writers) have been optimized. For some
+workloads this leads to 2x till 20x speedups.
+
+The default charsets supported are:
+
+ Cp424, Cp437, Cp737, Cp775, Cp850, Cp852, Cp855, Cp857, Cp860, Cp861,
+ Cp862, Cp863, Cp864, Cp865, Cp866, Cp869, Cp874, ISO_8859_1, ISO_8859_13,
+ ISO_8859_15, ISO_8859_2, ISO_8859_3, ISO_8859_4, ISO_8859_5, ISO_8859_6,
+ ISO_8859_7, ISO_8859_8, ISO_8859_9, KOI_8, MS874, MacCentralEurope,
+ MacCroatian, MacCyrillic, MacDingbat, MacGreek, MacIceland, MacRoman,
+ MacRomania, MacSymbol, MacThai, MacTurkish, US_ASCII, UTF_16, UTF_16BE,
+ UTF_16Decoder, UTF_16Encoder, UTF_16LE, UTF_8, UnicodeLittle, Windows1250,
+ Windows1251, Windows1252, Windows1253, Windows1254, Windows1255,
+ Windows1256, Windows1257, Windows1258.
+
+Many more encoding are supported through the new IconvProvider
+depending on the platform iconv support. GNU libiconv is recommended.
+The IconvProvider is currently not enabled by default. To enable it
+define the system property gnu.classpath.nio.charset.provider.iconv=true.
+Some runtimes might choose to enable this by default by setting it
+through VMSystemProperties. We would like to get feedback on whether
+enabling or disabling the IconvProvider by default results in the
+highest speedups.
Runtime interface changes:
+* jni.h changed to better support more VMs; see VM integration guide
+ for details.
* New --enable-default-toolkit option to configure can be used to set
the fully qualified class name of the default AWT toolkit to use.
If not given, the old default of gnu.java.awt.peerk.gtk.GtkToolkit
@@ -10,11 +40,6 @@
"core" JNI libraries. This is primarily useful if your VM can use the
Gtk peers but not the core JNI libraries.
-VM Interface changes:
-
-* jni.h changed to better support more VMs; see VM integration guide
- for details.
-
Other changes:
* Fixed compatibility problems in the Java Beans API which affected Eclipse's
Index: java/nio/charset/Charset.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/nio/charset/Charset.java,v
retrieving revision 1.20
diff -u -r1.20 Charset.java
--- java/nio/charset/Charset.java 29 Apr 2005 06:49:57 -0000 1.20
+++ java/nio/charset/Charset.java 29 Apr 2005 14:32:34 -0000
@@ -38,7 +38,10 @@
package java.nio.charset;
+import gnu.classpath.SystemProperties;
+
import gnu.java.nio.charset.Provider;
+import gnu.java.nio.charset.iconv.IconvProvider;
import java.io.BufferedReader;
import java.io.InputStreamReader;
@@ -129,7 +132,7 @@
try
{
- encoding = System.getProperty("file.encoding");
+ encoding = SystemProperties.getProperty("file.encoding");
}
catch(SecurityException e)
{
@@ -231,6 +234,12 @@
private static CharsetProvider provider()
{
+ String useIconv = SystemProperties.getProperty
+ ("gnu.classpath.nio.charset.provider.iconv");
+
+ if (useIconv != null)
+ return IconvProvider.provider();
+
return Provider.provider();
}
signature.asc
Description: This is a digitally signed message part
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] Enabling iconv charset provider,
Mark Wielaard <=