Skip to content

Reading UTF8 data #1

@santifa

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions