diff --git a/src/demo/org/apache/lucene/demo/html/HTMLParser.java b/src/demo/org/apache/lucene/demo/html/HTMLParser.java
index 2e00f53e4a7..7664be709e6 100644
--- a/src/demo/org/apache/lucene/demo/html/HTMLParser.java
+++ b/src/demo/org/apache/lucene/demo/html/HTMLParser.java
@@ -100,8 +100,8 @@ InterruptedException {
if (pipeIn == null) {
pipeInStream = new MyPipedInputStream();
pipeOutStream = new PipedOutputStream(pipeInStream);
- pipeIn = new InputStreamReader(pipeInStream);
- pipeOut = new OutputStreamWriter(pipeOutStream);
+ pipeIn = new InputStreamReader(pipeInStream, "UTF-16BE");
+ pipeOut = new OutputStreamWriter(pipeOutStream, "UTF-16BE");
Thread thread = new ParserThread(this);
thread.start(); // start parsing
diff --git a/src/demo/org/apache/lucene/demo/html/HTMLParser.jj b/src/demo/org/apache/lucene/demo/html/HTMLParser.jj
index a5487e11dcb..5ddcf5e645c 100644
--- a/src/demo/org/apache/lucene/demo/html/HTMLParser.jj
+++ b/src/demo/org/apache/lucene/demo/html/HTMLParser.jj
@@ -164,8 +164,8 @@ InterruptedException {
if (pipeIn == null) {
pipeInStream = new MyPipedInputStream();
pipeOutStream = new PipedOutputStream(pipeInStream);
- pipeIn = new InputStreamReader(pipeInStream);
- pipeOut = new OutputStreamWriter(pipeOutStream);
+ pipeIn = new InputStreamReader(pipeInStream, "UTF-16BE");
+ pipeOut = new OutputStreamWriter(pipeOutStream, "UTF-16BE");
Thread thread = new ParserThread(this);
thread.start(); // start parsing