Parent

Methods

FastGettext::Iconv

Public Class Methods

conv(to, from, str) click to toggle source
# File lib/fast_gettext/vendor/iconv.rb, line 48
def self.conv(to, from, str)
  raise InvalidCharacter, "the 3rd argument is nil" unless str
  begin
    str = java.lang.String.new(str.unpack("C*").to_java(:byte), from)
    str.getBytes(to).to_ary.pack("C*")
  rescue java.io.UnsupportedEncodingException
    raise InvalidEncoding
  end
end
iconv(to, from, str) click to toggle source
# File lib/fast_gettext/vendor/iconv.rb, line 106
def self.iconv(to, from, str)
  conv(to, from, str).split(//)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.