Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
頭が爆発しそうです... 文字列をUTF-8にエンコードするにはどうすればよいですか?
私はいつもこのエラーを受け取ります: Arguments to text methods must be UTF-8 encoded
Arguments to text methods must be UTF-8 encoded
私はPDFライターとしてエビを使用しています。
置く
# encoding: utf-8
rbファイルの最初の行。
あなたが使用することができますforce_encoding:
force_encoding
"some string".force_encoding("UTF-8")