LoginSignup
3
2

More than 5 years have passed since last update.

BOMなしUTF8をBOMつきUTF8にするためのワンライナー

Posted at

サンプル

ruby -e 'print "\uFEFF"; while gets; puts $_; end' nobom.csv >  bom.csv

解説

\uFEFFはBOMのリテラル。これを最初に文字として出力する。あとはファイルを読んでは書き出すということをしているだけ。

3
2
9

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
3
2