Skip to content

Reading UTF8 data #1

Description

@santifa

Hi folks,

I failed to process UTF8 encoded files.
I hunt down the problem, which is in XPathTermMapProcessor.java.

In line 59-60 following is defined:
StringBufferInputStream input = new StringBufferInputStream(node.toXML().toString());
Since Java 7 this stream is marked as deprecated because it can not convert correctly between char and bytes. doc

So please replace this line with something like
ByteArrayInputStream input = new ByteArrayInputStream(node.toXML().getBytes());

Greetings

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions