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

Amf3 utf8 fixes #96

Merged
merged 2 commits into from
Oct 8, 2020
Merged

Conversation

chatziko
Copy link
Contributor

@chatziko chatziko commented Oct 8, 2020

The current amf3 Writer is broken for multibyte chars (it needs to write the length in bytes, not chars). This PR:

  • adds a utf8 test for amf3

  • Changes the Writer to use haxe4's native utf8 (simpler, faster and correct)

    I didn't touch the haxe3 implementation cause I'm not sure what is the best way to fix it, and anyone who seriously needs multibyte support should move to haxe4 anyway. The test passes for both haxe3 & haxe4, because it tests multibyte chars only under haxe4.

Apart from being faster & simpler, this also fixes the current Writer
which is broken for multi-byte chars.
@ncannasse ncannasse merged commit b250cbb into HaxeFoundation:master Oct 8, 2020
@skial skial mentioned this pull request Oct 12, 2020
1 task
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