Flowdock
method

find_encoding

Importance_0
Ruby latest stable (v2_5_5) - 0 notes - Class: REXML::Encoding
find_encoding(name) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rexml/encoding.rb, line 33
    def find_encoding(name)
      case name
      when /\Ashift-jis\z/
        return "SHIFT_JIS"
      when /\ACP-(\d+)\z/
        name = "CP#{$1}"
      when /\AUTF-8\z/
        return name
      end
      begin
        ::Encoding::Converter.search_convpath(name, 'UTF-8')
      rescue ::Encoding::ConverterNotFoundError
        return nil
      end
      name
    end
Register or log in to add new notes.