Skip to content

Instantly share code, notes, and snippets.

@chokkoyamada
Last active September 10, 2015 05:50
Show Gist options
  • Save chokkoyamada/53dd4e369a902d4c0ddc to your computer and use it in GitHub Desktop.
Save chokkoyamada/53dd4e369a902d4c0ddc to your computer and use it in GitHub Desktop.
Shift_JIS, CRLFなcsvをUTF8, LFに変換する
include Kconv
File.open(converted_csv_file, 'w').write(File.open(csv_file, 'r').read.toutf8.encode(:universal_newline => true))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment