Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-286 - use utf-8 encoding for getBytes()

Ryan McKinley058aa7ed27c1
diff --git a/CHANGES.txt b/CHANGES.txt
index bed2246b038..800f34d4149 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -107,6 +107,9 @@ Bug Fixes
3. SOLR-283: autoCommit was not working after delete. (ryan)
+ 4. SOLR-286: ContentStreamBase was not using default encoding for getBytes()
+ (Toru Matsuzawa via ryan)
+
Other Changes
1. SOLR-135: Moved common classes to org.apache.solr.common and altered the
build scripts to make two jars: apache-solr-1.3.jar and
diff --git a/src/java/org/apache/solr/common/util/ContentStreamBase.java b/src/java/org/apache/solr/common/util/ContentStreamBase.java
index bb026dc53e5..b841d4f83a6 100755
--- a/src/java/org/apache/solr/common/util/ContentStreamBase.java
+++ b/src/java/org/apache/solr/common/util/ContentStreamBase.java
@@ -140,7 +140,7 @@ public abstract class ContentStreamBase implements ContentStream
}
public InputStream getStream() throws IOException {
- return new ByteArrayInputStream( str.getBytes() );
+ return new ByteArrayInputStream( str.getBytes(DEFAULT_CHARSET) );
}
/**