Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-2231

jest TokenReplacedStream use Reader instead of Inputstream

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.3.0
    • Component/s: jpa
    • Labels:
    • Patch Info:
      Patch Available

      Description

      in order to preserve utf-8 characters in replace-function , use Reader instead of Inputstream
      public class TokenReplacedStream {
      ...
      //public void replace(InputStream in, Writer out, String... prs) throws IOException {
      public void replace(Reader in, Writer out, String... prs) throws IOException {

      using new type:
      InputStream in=servletContext.getResourceAsStream(rsrc);
      BufferedReader in_br=new BufferedReader(new InputStreamReader(in,"UTF-8"));
      new TokenReplacedStream().replace(in_br,out_char,tokens);

        Attachments

          Activity

            People

            • Assignee:
              allee8285 Albert Lee
              Reporter:
              hvieren Herman Vierendeels
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: