Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
anomen-s opened this issue Oct 19, 2020 · 0 comments
Open

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

anomen-s opened this issue Oct 19, 2020 · 0 comments

Comments

@anomen-s
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant