diff options
| author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-31 23:04:45 +0000 |
|---|---|---|
| committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-31 23:04:45 +0000 |
| commit | 8892663d2b6130a25c9ee41ed0ad0d6337df44c4 (patch) | |
| tree | 197128d19a69a4d98898914df795f35c2aa631bc /ext/tk/sample/tkoptdb.rb | |
| parent | 9521e7d91d8d3341ba9694491c8fba3f55f0d020 (diff) | |
| download | ruby-8892663d2b6130a25c9ee41ed0ad0d6337df44c4.tar.gz ruby-8892663d2b6130a25c9ee41ed0ad0d6337df44c4.tar.xz ruby-8892663d2b6130a25c9ee41ed0ad0d6337df44c4.zip | |
* bug fix : wrong resource file format (resource.{en,jp})
* add Tk::Encoding.{encoding_convertfrom, encoding_convertto}
* add TkOptionDB.read_with_encoding to read non-utf8 resource file
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample/tkoptdb.rb')
| -rw-r--r-- | ext/tk/sample/tkoptdb.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/tk/sample/tkoptdb.rb b/ext/tk/sample/tkoptdb.rb index 066bd9501..6cb3d1799 100644 --- a/ext/tk/sample/tkoptdb.rb +++ b/ext/tk/sample/tkoptdb.rb @@ -10,7 +10,9 @@ require "tk" if ENV['LANG'] =~ /^ja/ # read Japanese resource - TkOptionDB.readfile(File.expand_path('resource.ja', File.dirname(__FILE__))) + TkOptionDB.read_with_encoding(File.expand_path('resource.ja', + File.dirname(__FILE__)), + 'euc-jp') else # read English resource TkOptionDB.readfile(File.expand_path('resource.en', File.dirname(__FILE__))) |
