[ruby/irb] irb_info codepage mismatch
`chcp` returns different encoding https://github.com/ruby/irb/commit/f80971994a
This commit is contained in:
parent
34deea3b42
commit
de0523fedd
@ -18,7 +18,7 @@ module IRB
|
|||||||
str += "LC_ALL env: #{ENV["LC_ALL"]}\n" if ENV["LC_ALL"] && !ENV["LC_ALL"].empty?
|
str += "LC_ALL env: #{ENV["LC_ALL"]}\n" if ENV["LC_ALL"] && !ENV["LC_ALL"].empty?
|
||||||
str += "East Asian Ambiguous Width: #{Reline.ambiguous_width.inspect}\n"
|
str += "East Asian Ambiguous Width: #{Reline.ambiguous_width.inspect}\n"
|
||||||
if RbConfig::CONFIG['host_os'] =~ /mswin|msys|mingw|cygwin|bccwin|wince|emc/
|
if RbConfig::CONFIG['host_os'] =~ /mswin|msys|mingw|cygwin|bccwin|wince|emc/
|
||||||
codepage = `chcp`.sub(/.*: (\d+)\n/, '\1')
|
codepage = `chcp`.b.sub(/.*: (\d+)\n/, '\1')
|
||||||
str += "Code page: #{codepage}\n"
|
str += "Code page: #{codepage}\n"
|
||||||
end
|
end
|
||||||
str
|
str
|
||||||
|
Loading…
x
Reference in New Issue
Block a user