Skip to content

getLocation() doesn't count xml prolog for non-utf8 documents #73

@anomen-s

Description

@anomen-s

Calling XMLStreamReader.getLocation().getCharacterOffset() works ok for utf-8 xml files.

But when file is for instance in iso-8859-2 encoding returned value is less by length of "" prolog.

I guess that ReaderScanner created in ByteSourceBootstrapper.doBootstrap is not given current position.
And thus length of prolog is not taken into account.

demo here:
anomen-s/programming-challenges@4c9d1a6

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