abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r524839 - /incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMSniffingInputStream.java
Date Mon, 02 Apr 2007 17:08:22 GMT
Author: jmsnell
Date: Mon Apr  2 10:08:21 2007
New Revision: 524839

URL: http://svn.apache.org/viewvc?view=rev&rev=524839
Log:
Fixing a problem with the sniffing code. In certain cases, an error would be thrown for UTF-16/32
encodings that used the BOM

Modified:
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMSniffingInputStream.java

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMSniffingInputStream.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMSniffingInputStream.java?view=diff&rev=524839&r1=524838&r2=524839
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMSniffingInputStream.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/FOMSniffingInputStream.java
Mon Apr  2 10:08:21 2007
@@ -87,21 +87,21 @@
       return null;
     } else if (equals(bom,2,UTF16be)) {
       bomset = true;
-      return "utf-16be";
+      return "utf-16";
     } else if (equals(bom,2,UTF16le)) {
       bomset = true;
-      return "utf-16le";
+      return "utf-16";
     } else if (equals(bom,3,UTF8))  {
       bomset = true;
       return "utf-8";
     } else if (equals(bom,4,UTF32be2)) {
-      charset = "utf-32be";
+      charset = "utf-32";
     } else if (equals(bom,4,UTF32le2)) {
-      charset = "utf-32le";
+      charset = "utf-32";
     } else if (equals(bom,4,UTF16be2)) {
-      charset = "utf-16be";
+      charset = "utf-16";
     } else if (equals(bom,4,UTF16le2)) {
-      charset = "utf-16le";
+      charset = "utf-16";
     }
     bomset = false;
     try { 



Mime
View raw message