Created
June 21, 2013 21:57
-
-
Save sergeyromanov/5834660 to your computer and use it in GitHub Desktop.
potion issue
This file contains hidden or 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
It seems that potion assumes that Unicode code points are 4 hex max: | |
sromanov@killdozer ~/mydev/potion $ cat example/unicode.pn | |
"I'm snowman - \u2603\n" print | |
"I'm bactrian - \u1f42b\n" print | |
sromanov@killdozer ~/mydev/potion $ bin/potion example/unicode.pn | |
I'm snowman - ☃ | |
I'm bactrian - ὂb | |
Pumpkin perl gets this right (since 5.8.9, at least): | |
sromanov@killdozer ~/mydev/potion $ cat example/unicode.pl | |
binmode STDOUT, ":encoding(UTF-8)"; | |
print "I'm snowman - \x{2603}\n"; | |
print "I'm bactrian - \x{1f42b}\n"; | |
sromanov@killdozer ~/mydev/potion $ perl example/unicode.pl | |
I'm snowman - ☃ | |
I'm bactrian - 🐫 | |
sromanov@killdozer ~/mydev/potion $ perl -le 'print $]' | |
5.008009 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment