Created
December 12, 2024 04:44
-
-
Save tompng/81f5def5c65b698c7d30a4003d02a8de to your computer and use it in GitHub Desktop.
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
puts <<RUBY.b | |
eval eval eval eval eval <<'CODE' | |
$>.set_encoding 'utf-8' | |
$><<"#{'あ'.b}" | |
<<'A' | |
# encoding: euc-jp | |
$><<"#{'い'.encode('euc-jp').b}" | |
<<'B' | |
# encoding: sjis | |
$><<"#{'う'.encode('sjis').b}" | |
<<'C' | |
# encoding: cp949 | |
$><<"#{'え'.encode('cp949').b}" | |
<<'D' | |
# encoding: cp951 | |
$><<"#{'お'.encode('cp951').b}" | |
D | |
C | |
B | |
A | |
CODE | |
RUBY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment