diff options
author | Art Welch <artw@apache.org> | 2002-01-31 18:14:42 +0000 |
---|---|---|
committer | Art Welch <artw@apache.org> | 2002-01-31 18:14:42 +0000 |
commit | 1c2b5eef98f64152384fb363cfe51a97232ea3e7 (patch) | |
tree | 641b2124f20f0c2fad3ecb3994219ca9c15b2d08 /src/org/apache | |
parent | b611bf585af2523a45efb93301762c32ae95c7b4 (diff) | |
download | xmlgraphics-fop-1c2b5eef98f64152384fb363cfe51a97232ea3e7.tar.gz xmlgraphics-fop-1c2b5eef98f64152384fb363cfe51a97232ea3e7.zip |
Generated text is written in UTF-8 encoding instead of ISO-8859-1
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194627 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache')
-rw-r--r-- | src/org/apache/fop/render/txt/TXTStream.java | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/org/apache/fop/render/txt/TXTStream.java b/src/org/apache/fop/render/txt/TXTStream.java new file mode 100644 index 000000000..9b2704271 --- /dev/null +++ b/src/org/apache/fop/render/txt/TXTStream.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. + * For details on use and redistribution please refer to the + * LICENSE file included with these sources. + */ + +package org.apache.fop.render.txt; + +import java.io.*; + +public class TXTStream { + OutputStream out = null; + boolean doOutput = true; + + public TXTStream(OutputStream os) { + out = os; + } + + public void add(String str) { + if (!doOutput) + return; + + try { + byte buff[] = str.getBytes("UTF-8"); + out.write(buff); + } catch (IOException e) { + throw new RuntimeException(e.toString()); + } + } + + public void setDoOutput(boolean doout) { + doOutput = doout; + } + +} |