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

Ignore UTF-8 BOM #67

Closed
h4cc opened this issue Jul 22, 2016 · 2 comments
Closed

Ignore UTF-8 BOM #67

h4cc opened this issue Jul 22, 2016 · 2 comments

Comments

@h4cc
Copy link

h4cc commented Jul 22, 2016

The Parser seems to fail for files with a UTF-8 BOM set:

** (CaseClauseError) no case clause matching: {:error, {1, :gpb_scan, {:illegal, [65279]}}, 1}
@tomas-abrahamsson
Copy link
Owner

Yes, BOMs are not expected. It seems Google protobuf accepts a BOM in 3.0.0-beta, but not in 2.6.1. I'll take a look.

@tomas-abrahamsson
Copy link
Owner

I just pushed 3.24.0, which skips over any UTF-8 BOMs. (hence closing this issue.)

(It also utf8-decodes the input .proto files, and utf8-encodes the generated files, but generally, this should be a nop in most cases. Only issue I can think of is non-ASCII in default values for strings, supposedly uncommon, but just for your information in any case)

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