1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

共有されたコードがモジバケッティだった場合の対処

1
Last updated at Posted at 2018-11-07

2秒で解決

$ brew install nkf

$ nkf -g okuraretekita_sorce_code.html
=> Shift_JIS # Shift-JISで来ちゃった!

$ nkf -w --overwrite okuraretekita_sorce_code.html
$ nkf -g okuraretekita_sorce_code.html
=> UTF-8 # ハイ解決!

補足

-w : UFT-8で出力
-e : EUCで出力
-s : Shift-JISコードを出力
-Lu : 改行形式をLFに変換
-Lw : 改行形式をCRLFに変換
-Lm : 改行形式をCRに変換
-g(--guess) : 文字コード自動判別の結果を表示
--overwrite : 元のファイルを上書きする

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?