Created
July 14, 2016 01:17
-
-
Save ron623/d314a3d3c1f494f816c018edca486e8a to your computer and use it in GitHub Desktop.
Encoding::CompatibilityError
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
2つのエンコーディング間に互換性がない場合に発生する例外。 | |
エンコーディングの異なる文字列を連結しようとした場合などに発生します。 | |
"あ".encode("EUC-JP") + "あ".encode("UTF-8") | |
#=> Encoding::CompatibilityError: incompatible character encodings: EUC-JP and UTF-8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment