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

Throws exception when file starts with byte order marker. #51

Open
SkipMike opened this issue Sep 13, 2017 · 1 comment
Open

Throws exception when file starts with byte order marker. #51

SkipMike opened this issue Sep 13, 2017 · 1 comment

Comments

@SkipMike
Copy link

The byte order marker is not recommended, however it is a part of utf-8 files. Currently, if a file is started with BOM, the parser errors expecting an element. Is this something that this library can support? Or is there some thing this prevents it from parsing from xmerl.

@sorliem
Copy link

sorliem commented Jan 4, 2018

I ran into this issue, but I was streaming the file, so I could use the :trim_bom option and it was fine.

You could also write your own bom trimming function and run the file content through it. Similar to how elixir now does it: https://github.com/elixir-lang/elixir/pull/5702/files

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

2 participants