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

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

Open
ahammel wants to merge 1 commit into
google:masterfrom
ahammel:master
Open

Bug: UTF-32-LE misdetected as UTF-16-LE#472
ahammel wants to merge 1 commit into
google:masterfrom
ahammel:master

Conversation

@ahammel

@ahammel ahammel commented Jan 30, 2019

Copy link
Copy Markdown

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

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
Copy Markdown

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
Copy Markdown

I signed it!

@ajh-at-work

Copy link
Copy Markdown

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

@ahammel

ahammel commented Mar 18, 2019

Copy link
Copy Markdown
Author

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

3 participants