Method: E4U::Encode::Encoding.to_cp932

Defined in:
lib/e4u/encode/encoding.rb

.to_cp932(str) ⇒ Object



15
16
17
18
19
20
21
22
# File 'lib/e4u/encode/encoding.rb', line 15

def self.to_cp932 str
  puts "utf8_to_cp932" if $DEBUG
  if RUBY_VERSION < '1.9.1'
    NKF.nkf('-Wsm0x', str)
  else
    str.encode('CP932')
  end
end