Created
May 31, 2018 07:45
-
-
Save igaiga/abb9cfb8237ba6adbd18a4695b6749a5 to your computer and use it in GitHub Desktop.
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
# enc_test.txt に 日本語 を1行書いておく | |
File.open("enc_test.txt") do |f| | |
puts out_str = f.each_line.first | |
puts out_str.encoding | |
end | |
puts in_str = "中の日本語" | |
puts in_str.encoding |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment