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 #601

Merged
merged 1 commit into from Jul 17, 2015
Merged

ignore UTF-8 BOM #601

merged 1 commit into from Jul 17, 2015

Conversation

anandolee
Copy link
Contributor

@xfxyjwf
Copy link
Contributor

xfxyjwf commented Jul 15, 2015

Add test cases?

@jtattermusch
Copy link
Contributor

+1 to adding a test(s)

@@ -762,6 +762,13 @@ bool Tokenizer::NextWithComments(string* prev_trailing_comments,
next_leading_comments);

if (current_.type == TYPE_START) {
if (TryConsume((char)0xEF)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proto file start -> Proto file starts

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps add a comment saying this adds support for reading UTF-8 BOM 0xFE, 0xBB, 0xBF prologue.

@anandolee
Copy link
Contributor Author

Tests added

@jtattermusch
Copy link
Contributor

LGTM, good to merge after travis & appveyor are green.

@xfxyjwf
Copy link
Contributor

xfxyjwf commented Jul 16, 2015

LGTM

anandolee added a commit that referenced this pull request Jul 17, 2015
@anandolee anandolee merged commit 7648852 into protocolbuffers:master Jul 17, 2015
taoso pushed a commit to taoso/protobuf that referenced this pull request Aug 1, 2018
adellahlou pushed a commit to adellahlou/protobuf that referenced this pull request Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

protoc doesn't support files starting with Byte order marks.
4 participants