From c257d811862b9e29ccff4305d836077835091112 Mon Sep 17 00:00:00 2001 From: aycabta Date: Sun, 26 Jan 2020 12:55:13 +0900 Subject: [PATCH] Always use UTF-8 for Reline::GeneralIO on Windows --- lib/reline/general_io.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/reline/general_io.rb b/lib/reline/general_io.rb index 6281d5fbf6..08b9d9c3ae 100644 --- a/lib/reline/general_io.rb +++ b/lib/reline/general_io.rb @@ -2,7 +2,7 @@ require 'timeout' class Reline::GeneralIO def self.encoding - Encoding.default_external + RUBY_PLATFORM =~ /mswin|mingw/ ? Encoding::UTF_8 : Encoding::default_external end RAW_KEYSTROKE_CONFIG = {}