Created
January 23, 2020 14:24
-
-
Save lizmat/fa6f11352210ab96302c7f40c88576a3 to your computer and use it in GitHub Desktop.
Streaming decoder fail?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $decoder = Encoding::Registry.find("utf8").decoder; | |
$decoder.add-bytes(utf8.new(0x0065)); # LATIN SMALL LETTER E | |
dd $decoder.consume-available-chars; | |
$decoder.add-bytes(utf8.new(0x0301)); # COMBINING ACUTE ACCENT | |
dd $decoder.consume-available-chars; | |
dd $decoder.consume-all-chars; | |
OUTPUT: | |
"" | |
"e\x[1]" | |
"" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment