From: Hidetoshi NAGAI <nagai / ai.kyutech.ac.jp>
Subject: Re: Bug with Ruby/Tk encoding (ruby-1.9.1-rc1)
Date: Thu, 8 Jan 2009 17:32:56 +0900
Message-ID: <20090108.173314.104043405.nagai / ai.kyutech.ac.jp>
> It means that "Encoding.locale_charmap" returns an empty string.

It may be abnormal. However, Ruby/Tk will rescue it. 
Please try the following patch. 
--------------------------------------------------------------
Index: ext/tk/lib/tk.rb
===================================================================
--- ext/tk/lib/tk.rb    (revision 21405)
+++ ext/tk/lib/tk.rb    (working copy)
@@ -3019,7 +3019,7 @@
     end

   else ### Ruby 1.9 !!!!!!!!!!!!
-    loc_enc_obj = ::Encoding.find(::Encoding.locale_charmap)
+    loc_enc_obj = (::Encoding.find(::Encoding.locale_charmap) rescue Tk::Encoding::UNKNOWN)
     ext_enc_obj = ::Encoding.default_external
     int_enc_obj = ::Encoding.default_internal || ext_enc_obj
     tksys_enc_name = Tk::Encoding::ENCODING_TABLE.get_name(Tk.encoding_system)
@@ -5550,7 +5550,7 @@
 #Tk.freeze

 module Tk
-  RELEASE_DATE = '2008-12-21'.freeze
+  RELEASE_DATE = '2009-01-09'.freeze

   autoload :AUTO_PATH,        'tk/variable'
   autoload :TCL_PACKAGE_PATH, 'tk/variable'
--------------------------------------------------------------
-- 
Hidetoshi NAGAI (nagai / ai.kyutech.ac.jp)