]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
language.rb: add '.UTF-8' to Lang2Locale values to make gettext use UTF-8 on WIN32
authorYaohan Chen <yaohan.chen@gmail.com>
Thu, 22 Nov 2007 04:32:32 +0000 (04:32 +0000)
committerYaohan Chen <yaohan.chen@gmail.com>
Thu, 22 Nov 2007 04:32:32 +0000 (04:32 +0000)
lib/rbot/language.rb

index 3e4c77f0c37ba77a67d507ceb8149d64eaaafcfe..67114dac58277eb176b8340317a86f0901252c65 100644 (file)
@@ -27,6 +27,8 @@ class Bot
       :traditional_chinese => 'zh_TW',
       :simplified_chinese => 'zh_CN'
     }
+    # On WIN32 it appears necessary to have ".UTF-8" explicitly for gettext to use UTF-8
+    Lang2Locale.each_value {|v| v.replace(v + '.UTF-8')}
 
     # Return the shortest language for the current
     # GetText locale