my head is on the edge of exploding...
How can I encode my string to UTF-8?
I always get this error:
Arguments to text methods must be UTF-8 encoded
I use Prawn as PDF Writer.
放
# encoding: utf-8
在您的 rb 文件的第一行。
你可以使用force_encoding
:
"some string".force_encoding("UTF-8")