Skip to content

Commit

Permalink
Merge pull request #259 from aycabta/support-non-english
Browse files Browse the repository at this point in the history
Support non-English code page message
  • Loading branch information
aycabta authored Jul 20, 2021
2 parents b705aa7 + e7d71fe commit 124025a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/irb/cmd/info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def inspect
str += "LANG env: #{ENV["LANG"]}\n" if ENV["LANG"] && !ENV["LANG"].empty?
str += "LC_ALL env: #{ENV["LC_ALL"]}\n" if ENV["LC_ALL"] && !ENV["LC_ALL"].empty?
if RbConfig::CONFIG['host_os'] =~ /mswin|msys|mingw|cygwin|bccwin|wince|emc/
codepage = `chcp`.sub(/Active code page: (\d+)\n/, '\1')
codepage = `chcp`.sub(/.*: (\d+)\n/, '\1')
str += "Code page: #{codepage}\n"
end
str
Expand Down

0 comments on commit 124025a

Please sign in to comment.