Skip to content

Instantly share code, notes, and snippets.

@tomoyamkung
Created August 1, 2012 05:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomoyamkung/3223859 to your computer and use it in GitHub Desktop.
Save tomoyamkung/3223859 to your computer and use it in GitHub Desktop.
[Ruby]文字コードを UTF-8 に変換するスニペット
require 'nkf'
string_utf8 = NKF.nkf('-w', string)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment