def invalid_characters(input_encoding=nil)
      iban = input_encoding ? @compact.dup.force_encoding(input_encoding) : @compact

      iban.gsub(/[A-Z0-9?]*/i, '').chars.to_a.uniq # to_a is for ruby <= 2.0 where String#chars returns an Enumerator
    end
def invalid_characters(input_encoding=nil)
      iban = input_encoding ? @compact.dup.force_encoding(input_encoding) : @compact

      iban.gsub(/[A-Z0-9?]*/i, '').chars.to_a.uniq # to_a is for ruby <= 2.0 where String#chars returns an Enumerator
    end
@example
     invalid = "hägar"
     invalid.encoding # => #<Encoding:UTF-8>
     ISO::IBAN.new(invalid).invalid_characters          # => ["\xC3", "\xA4"]
     ISO::IBAN.new(invalid).invalid_characters('utf-8') # => ["ä"]

 @param [String, Encoding, nil] input_encoding
   ISO::IBAN::new interprets the passed IBAN as binary.
   If you got the IBAN from a source which is not binary, you should provide that encoding.
   Otherwise an invalid character may be split into multiple bytes.

 @return [Array] An Array with all invalid characters.