set_encoding(extern, intern = nil) private

No documentation

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

Hide source
# File lib/irb/init.rb, line 289
    def set_encoding(extern, intern = nil)
      verbose, $VERBOSE = $VERBOSE, nil
      Encoding.default_external = extern unless extern.nil? || extern.empty?
      Encoding.default_internal = intern unless intern.nil? || intern.empty?
      @CONF[:ENCODINGS] =, intern)
      [$stdin, $stdout, $stderr].each do |io|
        io.set_encoding(extern, intern)
      @CONF[:LC_MESSAGES].instance_variable_set(:@encoding, extern)
      $VERBOSE = verbose
Register or log in to add new notes.