You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by yo...@apache.org on 2006/07/17 19:29:50 UTC

svn commit: r422768 - in /incubator/solr/trunk: CHANGES.txt src/java/org/apache/solr/util/XML.java

Author: yonik
Date: Mon Jul 17 10:29:50 2006
New Revision: 422768

URL: http://svn.apache.org/viewvc?rev=422768&view=rev
Log:
work around Jetty bug with non-ascii chars in Writer: SOLR-32

Modified:
    incubator/solr/trunk/CHANGES.txt
    incubator/solr/trunk/src/java/org/apache/solr/util/XML.java

Modified: incubator/solr/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/CHANGES.txt?rev=422768&r1=422767&r2=422768&view=diff
==============================================================================
--- incubator/solr/trunk/CHANGES.txt (original)
+++ incubator/solr/trunk/CHANGES.txt Mon Jul 17 10:29:50 2006
@@ -57,6 +57,11 @@
  4. WordDelimiterFilter sometimes lost token positionIncrement information
  5. Fix reverse sorting for fields were sortMissingFirst=true
     (Rob Staveley, yonik)
+ 5. Worked around a Jetty bug that caused invalid XML responses for fields
+    containing non ASCII chars.  (Bertrand Delacretaz via yonik, SOLR-32)
+
+ reverse sorting for fields were sortMissingFirst=true
+    (Rob Staveley, yonik)
 
 Other Changes
  1. Upgrade to Lucene 2.0 nightly build 2006-06-22, lucene SVN revision 416224,

Modified: incubator/solr/trunk/src/java/org/apache/solr/util/XML.java
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/src/java/org/apache/solr/util/XML.java?rev=422768&r1=422767&r2=422768&view=diff
==============================================================================
--- incubator/solr/trunk/src/java/org/apache/solr/util/XML.java (original)
+++ incubator/solr/trunk/src/java/org/apache/solr/util/XML.java Mon Jul 17 10:29:50 2006
@@ -159,8 +159,9 @@
       }
       if (subst != null) {
         if (start<i) {
-          // out.write(str.substring(start,i));
-          out.write(str, start, i-start);
+          out.write(str.substring(start,i));
+          // write(str,off,len) causes problems for Jetty with chars > 127
+          //out.write(str, start, i-start);
           // n+=i-start;
         }
         out.write(subst);
@@ -172,8 +173,9 @@
       out.write(str);
       // n += str.length();
     } else if (start<str.length()) {
-      // out.write(str.substring(start));
-      out.write(str, start, str.length()-start);
+      out.write(str.substring(start));
+      // write(str,off,len) causes problems for Jetty with chars > 127
+      // out.write(str, start, str.length()-start);
       // n += str.length()-start;
     }
     // return n;