In Files

  • encoding.c

Encoding::InvalidByteSequenceError

Public Instance Methods

destination_encoding → string click to toggle source

Returns the destination encoding as an encoding object.

 
               static VALUE
ecerr_destination_encoding(VALUE self)
{
    return rb_attr_get(self, rb_intern("destination_encoding"));
}
            
destination_encoding_name → string click to toggle source

Returns the destination encoding name as a string.

 
               static VALUE
ecerr_destination_encoding_name(VALUE self)
{
    return rb_attr_get(self, rb_intern("destination_encoding_name"));
}
            
error_bytes → string click to toggle source

Returns the discarded bytes when Encoding::InvalidByteSequenceError occurs.

ec = Encoding::Converter.new("EUC-JP", "ISO-8859-1")
begin
  ec.convert("abc\xA1\xFFdef")
rescue Encoding::