こんな感じのやつ \xE3\x81\x99\xE3\x82\x82\xE3\x82\x82 標準出力が文字化けする場合 pではなくputsかprintを使う 正規表現とかがヒットしなくてこんなエラーが出る場合 incompatible encoding regexp match (UTF-8 regexp with ASCII-8BIT string) (Encoding::CompatibilityError) String.force_encoding("UTF-8")を使う Register as a new user and use Qiita more conveniently You get articles that match your needsYou can efficiently read back useful informationYou can use dark