encoding()
The external encoding for standard input.
# File lib/irb/input-method.rb, line 186 def encoding @stdin.external_encoding end