Skip to content

Polyfill utf8.char #19

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Polyfill utf8.char #19

wants to merge 2 commits into from

Conversation

Validark
Copy link

@Validark Validark commented Jul 8, 2022

No description provided.

@Validark
Copy link
Author

It's pretty easy to verify this is the correct implementation btw. Just run this for all possible inputs in Lua 5.4 (and make it so utf8_char is always the custom version):

for i = 0, 1114111 do
    assert(utf8_char(i) == utf8.char(i))
end

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant