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.

[memo] エンコーディング変換経路 on Ruby1.9.3

Last updated at Posted at 2012-03-16
version: ruby 1.9.3p0

SJISからUTF-16LEへの変換パス

SJIStoUTF-16LE.rb
p Encoding::Converter.new("SJIS", "UTF-16LE").convpath
#=> [[#<Encoding:Windows-31J>, #<Encoding:UTF-8>], [#<Encoding:UTF-8>, #<Encoding:UTF-16LE>]]

Shift_JISからUTF-16LEへの変換パス

Shift_JIStoUTF-16LE.rb
p Encoding::Converter.new("Shift_JIS", "UTF-16LE").convpath
#=> [[#<Encoding:Shift_JIS>, #<Encoding:UTF-8>], [#<Encoding:UTF-8>, #<Encoding:UTF-16LE>]]
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?