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

Implement Uni.encode #5274

Merged
merged 1 commit into from Jun 13, 2023
Merged

Implement Uni.encode #5274

merged 1 commit into from Jun 13, 2023

Conversation

Leont
Copy link
Contributor

@Leont Leont commented Jun 5, 2023

This allows one to write normalized unicode strings. It should be noted that this is not an optimized implementation at all, written in nqp it should be faster and even faster if it would be made a syscall, but first make it correct and then make it fast.

raku -e 'my $s = "ë"; dd $s.NFC.encode; dd $s.NFD.encode'
Buf.new(195,171)
Buf.new(101,204,136)

This fixes #4768

This allows one to write normalized unicode strings. It should be noted
that this is not an optimized implementation at all, written in nqp it
should be faster and even faster if it would be made a syscall.
@lizmat lizmat merged commit e3a7474 into rakudo:main Jun 13, 2023
5 of 11 checks passed
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.

Unicode normalization forms can't encode
2 participants