From: speakillof Date: 2005-04-05T00:12:16+09:00 Subject: Re: about REXML::Encoding --0-904382395-1112627517=:65305 Content-Type: text/plain; charset=iso-2022-jp Content-Id: Content-Disposition: inline Hi. > I think it was because the patch's solution breaks in cases where > two different encoded files are loaded one after the other, > but that's just a superficial guess and could be wrong. I write a script in which 'euc-jp' and 'utf-8' are tested. I attach the test script to this mail. # This script is written in UTF8. Also, it includes Japanese # characters. If you don't have Unicode font, You see odd characters. Before testing, [ruby-core:1960]'s patch is needed. After patched, rexml/encodings/euc-jp.rb is modified manually according to 'euc-jp.rb.rej'. And, If you don't have iconv or uconv, you must install one of them. In the script, REXML::Encoding is included in Foo class. REXML::Encoding#encoding=() is called two times and 'euc-jp' and 'UTF-8' are assigned each time. In my environment, it seems this test script works well. > I looked at this when the patch was first proposed, and had > a reason for only accepting the part of the patch > that fixed the encoding's name... > although I don't the reason at the moment. Yes. SHIFT-JIS and SHIFT_JIS problem is fixed in CVS. > I'm going to have to revisit it in more depth before I can give you > a definitive answer. Thank you for re-checking the patch. I am glad to hear that you review the patch. __________________________________ Do You Yahoo!? Upgrade Your Life http://bb.yahoo.co.jp/ --0-904382395-1112627517=:65305 Content-Type: application/octet-stream; name="foo.rb" Content-Transfer-Encoding: base64 Content-Description: foo.rb Content-Disposition: attachment; filename="foo.rb" IyEvdXNyL2Jpbi9ydWJ5IC1LdQoKJExPQURfUEFUSC51bnNoaWZ0KCcuJykK cmVxdWlyZSAna2NvbnYnCgokdSA9ICfjg4bjgrnjg4gg44G744GSIOOBteOB jCDnvo7jgZfjgYQnCiRlID0gS2NvbnYudG9ldWMoJHUpCgoKcmVxdWlyZSAn cmV4bWwvZW5jb2RpbmcnCgpjbGFzcyBGb28KICBpbmNsdWRlIFJFWE1MOjpF bmNvZGluZwplbmQKCgpmID0gRm9vLm5ldwoKZi5lbmNvZGluZyA9ICdFVUMt SlAnCnAgKGYuZGVjb2RlKCRlKSA9PSAkdSkKYmVnaW4KICBwIChmLmRlY29k ZSgkdSkgPT0gJHUpCnJlc2N1ZQogIHAgJ2Vycm9yJwplbmQKCmYuZW5jb2Rp bmcgPSAnVVRGLTgnCnAgKGYuZGVjb2RlKCRlKSA9PSAkdSkKcCAoZi5kZWNv ZGUoJHUpID09ICR1KQoK --0-904382395-1112627517=:65305--