diff options
Diffstat (limited to 'ext/tk/sample/encstr_usage.rb')
-rw-r--r-- | ext/tk/sample/encstr_usage.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/tk/sample/encstr_usage.rb b/ext/tk/sample/encstr_usage.rb index 4285ec861c..b22c2504ac 100644 --- a/ext/tk/sample/encstr_usage.rb +++ b/ext/tk/sample/encstr_usage.rb @@ -11,7 +11,7 @@ t1 = TkText.new(:height=>5).pack t2 = TkText.new(:height=>5).pack t3 = TkText.new(:height=>5).pack -src_str = IO.readlines('iso2022-kr.txt').join +src_str = IO.readlines(File.join(File.dirname(__FILE__),'iso2022-kr.txt')).join t1.insert('end', "use neither Tk::EncodedString class nor Tk.encoding= method\n\n") @@ -23,7 +23,8 @@ t2.insert('end', t2.insert('end', enc_str) Tk.encoding = 'iso2022-kr' -t3.insert('end', "use Tk.encoding = 'iso2022-kr'\n\n") +t3.insert('end', "use Tk.encoding = 'iso2022-kr' (Tk.force_default_encoding? == #{Tk.force_default_encoding?})\n\n") + t3.insert('end', src_str) Tk.mainloop |