Created
October 9, 2011 02:03
-
-
Save kirikak2/1273188 to your computer and use it in GitHub Desktop.
kconv bug?
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
$ ruby utfeuc_convertion.rb | |
"弌 丐 丕 个 丱 丶 丼 丿 乂 乖 乘 亂 亅 豫 亊\n舒 弍 于 亞 亟 亠 亢 亰 亳 亶 从 仍 仄 仆 仂 仗\n" | |
"С Т У Ф Х Ц Ч Ш Щ Ъ Ы Ь Э Ю Я\nа б в г д е ж з и й к л м н о п\n" | |
false | |
"蹇 蹉 蹌 蹐 蹈 蹙 蹤 蹠 踪 蹣 蹕 蹶 蹲 蹼 躁\n躇 躅 躄 躋 躊 躓 躑 躔 躙 躪 躡 躬 躰 軆 躱 躾\n軅 軈 軋 軛 軣 軼 軻 軫 軾 輊 輅 輕 輒 輙 輓 輜\n輟 輛 輌 輦 輳 輻 輹 轅 轂 輾 轌 轉 轆 轎 轗 轜\n轢 轣 轤 辜 辟 辣 辭 辯 辷 迚 迥 迢 迪 迯 邇 迴\n逅 迹 迺 逑 逕 逡 逍 逞 逖 逋 逧 逶 逵 逹 迸\n" | |
"蹇 悊 惞 惕 蹈 惲 愑 愷 愰 憘 戓 抦 揵 摠 撝\n擎 躅 昀 昕 躊 昉 昮 昞 昤 躪 晗 晙 躰 晳 暙 暠\n暲 暿 曺 朎 軣 杦 枻 桒 柀 輊 桄 棏 輒 楨 輓 榘\n槢 樰 輌 橆 橳 橾 輹 櫤 毖 氿 汜 沆 汯 泚 洄 涇\n浯 涖 涬 淏 辟 辣 淼 渹 湜 渧 渼 溿 澈 澵 濵 瀅\n瀇 迹 炅 炫 焏 焄 煜 煆 煇 逋 燁 燾 犱 逹 迸\n" | |
false | |
"銷 鋩\n" | |
"¬ ¦\n" | |
false |
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
#!/usr/bin/ruby -Ku | |
require 'kconv' | |
kanji5020_503F = <<KANJI | |
弌 丐 丕 个 丱 丶 丼 丿 乂 乖 乘 亂 亅 豫 亊 | |
舒 弍 于 亞 亟 亠 亢 亰 亳 亶 从 仍 仄 仆 仂 仗 | |
KANJI | |
kanji6D22_6D7D = <<KANJI | |
蹇 蹉 蹌 蹐 蹈 蹙 蹤 蹠 踪 蹣 蹕 蹶 蹲 蹼 躁 | |
躇 躅 躄 躋 躊 躓 躑 躔 躙 躪 躡 躬 躰 軆 躱 躾 | |
軅 軈 軋 軛 軣 軼 軻 軫 軾 輊 輅 輕 輒 輙 輓 輜 | |
輟 輛 輌 輦 輳 輻 輹 轅 轂 輾 轌 轉 轆 轎 轗 轜 | |
轢 轣 轤 辜 辟 辣 辭 辯 辷 迚 迥 迢 迪 迯 邇 迴 | |
逅 迹 迺 逑 逕 逡 逍 逞 逖 逋 逧 逶 逵 逹 迸 | |
KANJI | |
kanji6E79_6E7A = <<KANJI | |
銷 鋩 | |
KANJI | |
p kanji5020_503F | |
p kanji5020_503F.toeuc.toutf8 | |
p kanji5020_503F == kanji5020_503F.toeuc.toutf8 | |
p kanji6D22_6D7D | |
p kanji6D22_6D7D.toeuc.split(//e).map{|c| c.toutf8 }.join | |
p kanji6D22_6D7D == kanji6D22_6D7D.toeuc.split(//e).map{|c| c.toutf8 }.join | |
p kanji6E79_6E7A | |
p kanji6E79_6E7A.toeuc.toutf8 | |
p kanji6E79_6E7A == kanji6E79_6E7A.toeuc.toutf8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment