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

fix utf16 decode issue #9

Merged
merged 6 commits into from
Sep 23, 2019
Merged

fix utf16 decode issue #9

merged 6 commits into from
Sep 23, 2019

Conversation

magodo
Copy link
Contributor

@magodo magodo commented Sep 19, 2019

Thank for your awesome effort on this library. I'm using it to parse the ID3v2 tags for some international files, and encounter issues when some frame is encoded with utf16. In which case it doesn't work well.

Finally I figured out there where two issues:

  1. when trying to get the frame identifier, it has no need to use the evaluated encoding type, since it always guaranteed to be 4 chars.
  2. when decode utf16 code point, what you got as input is not the code point itself. For example, the code point of Chinese character "人" 's codepoint is \xbaN, but what you got as input is: [186, 78]. So you should not directly use String.fromCodePoints(). Instead use the official lib utf.

@NiKoTron
Copy link
Owner

Hi, @magodo! Thank you for a founded issue and made a detailed explanation of it. But could you please re-create Pull Request on to the develop branch?

@magodo magodo changed the base branch from master to develop September 23, 2019 00:52
@NiKoTron NiKoTron merged commit 40a86dc into NiKoTron:develop Sep 23, 2019
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