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

XMLEventReader cannot handle utf-8 byte order mark #93

Open
biswanaths opened this issue Jul 20, 2015 · 0 comments
Open

XMLEventReader cannot handle utf-8 byte order mark #93

biswanaths opened this issue Jul 20, 2015 · 0 comments

Comments

@biswanaths
Copy link
Owner

When trying to use XMLEventReader with an utf-8 encoded XML document that starts with a byte order mark (EF BB BF), an empty iterator is returned, and an error message is printed to stderr.

test.scala
import scala.io.Source
import scala.xml.pull.XMLEventReader

val t = new XMLEventReader(Source.fromFile("hasBOM.xml"))

println(t)

Output of scala test.scala
file:/tmp/hasBOM.xml:1:1: < expected<?xml version="1.0" encoding="UTF-8" standalone="yes"?>^
empty iterator

The attached file hasBOM.xml has CR+LF newlines, but LF or CR newlines do not change the behaviour.

Imported from : SI-6741

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