FasterXML/aalto-xml

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

anomen-s opened this issue · 0 comments

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