[ruby-list:50843] String#encode, NKF, iconvの違い
From:
"Masa Sakano" <imagine@...>
Date:
2019-11-16 18:09:54 UTC
List:
ruby-list #50843
坂野正明です。 先日、stackoverflow.com で、質問 「How do I filter out invisible characters without affecting Japanese character set?」 に回答しました。その回答の際、 String#encode, NKF (標準添付ライブラリ), iconv (Gem) の三つの挙動比較したところ、それぞれ微妙に違うことがわかりました(意図的な違いだと理解しています)。私の回答↓で、その違いをまとめました(回答言語は英語です)。 https://stackoverflow.com/questions/58829740/how-do-i-filter-out-invisible-characters-without-affecting-japanese-character-se/58863231#58863231 提示した例を一括してまとめたものを gist に置いています↓ https://gist.github.com/masasakano/10703ccb621d08c51f7e19e8900ea0ae Rubyによる日本語処理関係の話なので、このMLの皆様の方が興味ある方多いかと思い、お知らせでした。 坂野正明