You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ar...@apache.org on 2002/01/31 19:14:42 UTC

cvs commit: xml-fop/src/org/apache/fop/render/txt TXTStream.java

artw        02/01/31 10:14:42

  Added:       src/org/apache/fop/render/txt TXTStream.java
  Log:
  Generated text is written in UTF-8 encoding instead of ISO-8859-1
  
  Revision  Changes    Path
  1.1                  xml-fop/src/org/apache/fop/render/txt/TXTStream.java
  
  Index: TXTStream.java
  ===================================================================
  /*
   * 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;
      }
  
  }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org