LoginSignup
2
2

More than 5 years have passed since last update.

某チューブの日本語が文字化けする

Posted at

nokogiriを使って取得した某チューブのhtmlの日本語が URI.unescape しても化けて困った。

下記のようにして URI.unescape したらいけた



require "kconv"



doc = Nokogiri::HTML(open(url), nil, "utf-8")

あとは普通にしたい処理をするだけ。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2