summaryrefslogtreecommitdiff
path: root/lib/irb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/irb')
-rw-r--r--lib/irb/locale.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/irb/locale.rb b/lib/irb/locale.rb
index 0e36359f5b..dad6b2f075 100644
--- a/lib/irb/locale.rb
+++ b/lib/irb/locale.rb
@@ -27,20 +27,20 @@ module IRB
attr_reader :lang
+ @@LC2KCONV = {
+ # "ja" => Kconv::JIS,
+ # "ja_JP" => Kconv::JIS,
+ "ja_JP.ujis" => Kconv::EUC,
+ "ja_JP.euc" => Kconv::EUC,
+ "ja_JP.eucJP" => Kconv::EUC,
+ "ja_JP.sjis" => Kconv::SJIS,
+ "ja_JP.SJIS" => Kconv::SJIS,
+ }
+
def String(mes)
mes = super(mes)
case @lang
when /^ja/
- @@LC2KCONV = {
- # "ja" => Kconv::JIS,
- # "ja_JP" => Kconv::JIS,
- "ja_JP.ujis" => Kconv::EUC,
- "ja_JP.euc" => Kconv::EUC,
- "ja_JP.eucJP" => Kconv::EUC,
- "ja_JP.sjis" => Kconv::SJIS,
- "ja_JP.SJIS" => Kconv::SJIS,
- } unless defined? @@LC2KCONV
-
mes = Kconv::kconv(mes, @@LC2KCONV[@lang])
else
mes