classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] gnu/xml/transform/StreamSerializer.java: compatibilityMode


From: Ito Kazumitsu
Subject: [cp-patches] gnu/xml/transform/StreamSerializer.java: compatibilityMode setting
Date: 13 Feb 2005 00:09:10 -0000
User-agent: SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) Emacs/21.3.50 (i386-unknown-freebsd5.3) MULE/5.0 (SAKAKI)

Hi,

gnu/xml/transform/StreamSerializer.java sets compatibilityMode to true
for any encoding other than UTF* or UCS*.

This is very inconvenient for people using non-ASCII encodings,
especially CJK encodings, where most of the characters > 127.

compatibilityMode being set to true, the output grows too large
and becomes completely human-unreadable.

I would like by some means to set compatibilityMode to false,
and this is what I did.

--- gnu/xml/transform/StreamSerializer.java.orig        Fri Dec 24 07:38:44 2004
+++ gnu/xml/transform/StreamSerializer.java     Sun Feb 13 08:43:33 2005
@@ -106,6 +106,12 @@
             compatibilityMode = false;
           }
       }
+    String sysprop = System.getProperty(
+        "gnu.xml.transform.StreamSerializer.compatibilityMode");
+    if (sysprop != null)
+      {
+        compatibilityMode = ("true".equalsIgnoreCase(sysprop));
+      }
     this.eol = (eol != null) ? eol : System.getProperty("line.separator");
     namespaces = new HashMap();
   }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]