diff options
| author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-17 07:31:51 +0000 |
|---|---|---|
| committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-17 07:31:51 +0000 |
| commit | 9e09ae4a37f942fa4b6410caea6b3a9e5e7b0c17 (patch) | |
| tree | a689baeebc8d0de7bc5952c74ac6f9773bdae6a2 /ext/tk/lib/tk.rb | |
| parent | 906ca0fd2a4b6050d2b8a9a14131f5380362fa18 (diff) | |
| download | ruby-9e09ae4a37f942fa4b6410caea6b3a9e5e7b0c17.tar.gz ruby-9e09ae4a37f942fa4b6410caea6b3a9e5e7b0c17.tar.xz ruby-9e09ae4a37f942fa4b6410caea6b3a9e5e7b0c17.zip | |
* ext/tk/lib/tk.rb: fix bug on setting up system encoding
* ext/tk/lib/tk/event.rb: fix error on require process
* ext/tk/lib/font.rb: fix abnormal termination error on Windows
* ext/tk/lib/tk/virtevent.rb: TkVirtualEvent::PreDefVirtEvent.new()
accepts event-sequence arguments
* ext/tk/lib/text.rb: fail to dump embedded images
* ext/tk/lib/text.rb: tag_nextrange and tag_prevrange returns wrong
types of values
* ext/tk/lib/texttag.rb: nextrange and prevrange returns wrong types of values
* ext/tk/lib/text.rb: add TkText::IndexModMethods module and
TkText::IndexString class to treat text index modifiers
* ext/tk/lib/texttag.rb: use TkText::IndexModMethods module
* ext/tk/lib/textmark.rb: ditto
* ext/tk/lib/textimage.rb: ditto
* ext/tk/lib/textwindow.rb: ditto
* ext/tk/lib/textimage.rb: wrong gravity of text mark for embedded image
* ext/tk/lib/textwindow.rb: wrong gravity of text mark for embedded window
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib/tk.rb')
| -rw-r--r-- | ext/tk/lib/tk.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb index 3cb911147..97535af12 100644 --- a/ext/tk/lib/tk.rb +++ b/ext/tk/lib/tk.rb @@ -2056,15 +2056,28 @@ if (/^(8\.[1-9]|9\.|[1-9][0-9])/ =~ Tk::TCL_VERSION && !Tk::JAPANIZED_TK) case $KCODE when /^e/i # EUC Tk.encoding = 'euc-jp' + Tk.encoding_system = 'euc-jp' when /^s/i # SJIS - Tk.encoding = 'shiftjis' + begin + if Tk.encoding_system == 'cp932' + Tk.encoding = 'cp932' + else + Tk.encoding = 'shiftjis' + Tk.encoding_system = 'shiftjis' + end + rescue StandardError, NameError + Tk.encoding = 'shiftjis' + Tk.encoding_system = 'shiftjis' + end when /^u/i # UTF8 Tk.encoding = 'utf-8' + Tk.encoding_system = 'utf-8' else # NONE begin Tk.encoding = Tk.encoding_system rescue StandardError, NameError Tk.encoding = 'utf-8' + Tk.encoding_system = 'utf-8' end end |
