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

Added BOM support #26

Merged
merged 1 commit into from
Oct 24, 2023
Merged

Added BOM support #26

merged 1 commit into from
Oct 24, 2023

Conversation

Vector-Hector
Copy link
Contributor

Now skipping the Byte Order Mark (BOM) if it exists. Old version would include the BOM in the first header field, so it would not match the specified fields correctly.

Now skipping the BOM if it exists
Copy link
Owner

@artonge artonge left a comment

Choose a reason for hiding this comment

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

Thanks for the proposal! :)
I didn't know about such character. Can you link to some documentation about it?

@Vector-Hector
Copy link
Contributor Author

Hi, of course ;)

Here is the official unicode docs on BOM: https://www.unicode.org/versions/Unicode15.1.0/ch02.pdf#G27981

For UTF-8, the BOM only signals that the document is using unicode: https://www.unicode.org/faq/utf_bom.html#utf8-2

An issue on this topic indicates, that the reader should skip over it: golang/go#33887

@artonge
Copy link
Owner

artonge commented Oct 24, 2023

I am unsure whether this logic really belongs here, but why not :)

@artonge artonge merged commit f0066f9 into artonge:master Oct 24, 2023
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants