1
1

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.

カレントディレクトリ以下のsjisファイルをutf-8に変換する

Posted at

カレントディレクトリに色々な文字コードのファイルがあって、sjisファイルのみをutf-8に変換する方法。

$ find . -type f -name "*.php" | xargs nkf -g  | grep Shift_JIS | sed -e 's/:Shift_JIS (CR)//g' | xargs nkf -Sw --overwrite

解説は後ほど書く。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?