Skip to content
This repository was archived by the owner on Nov 5, 2022. It is now read-only.

Bug: UTF-32-LE misdetected as UTF-16-LE #472

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ahammel
Copy link

@ahammel ahammel commented Jan 30, 2019

Problem: the byte-order mark detector selects the the UTF-16-LE
encoding if the first two bytes of the stream are OxFF OxFE, without
checking to see if the next two bytes are null (which is the BOM for
UTF-32-LE).

Solution: check for the UTF-32 BOMs before checking for the UTF-16
marks.

Resolves #471

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Problem: the byte-order mark detector selects the the UTF-16-LE
encoding if the first two bytes of the stream are OxFF OxFE, without
checking to see if the next two bytes are null (which is the BOM for
UTF-32-LE).

Solution: check for the UTF-32 BOMs before checking for the UTF-16
marks.
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@ajh-at-work
Copy link

I signed it!

@ajh-at-work
Copy link

Wait, no I didn't. Now I signed it!

@ahammel
Copy link
Author

ahammel commented Mar 18, 2019

Let's try this with the right GH account.

I signed it!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants