From: Martin Duerst Date: 2007-12-12T19:16:27+09:00 Subject: Encoding and test::unit [I'm posting this to ruby-core rather than ruby-dev, where most of the internationalization-related discussion is taking place, and I'm also copying Nathaniel because I'm not sure he is on this list.] Starting to implement character encoding conversions (String#encode) in Ruby, I of course also started to do some testing. I run across some cases where I got messages such as: <"D\xfcrst"> expected but was <"D\xfcrst">. What's going on, and how to deal with it, is rather clear to me, but for the average user, such a message will be very confusing. What I'd like to have is something like: <"D\xfcrst" (encoding: ASCII-8BIT)> expected but was <"D\xfcrst" (encoding: ISO-8859-3)>. On the other hand, it would look somewhat silly if messages such as: <"foo"> expected but was <"bar">. were suddenly reading: <"foo" (encoding: ASCII-8BIT)> expected but was <"bar" (encoding: ASCII-8BIT)>. I have had a quick look at lib/test/unit/assertions.rb, but it doesn't look clear how this could be fixed the way I think it should (and I'm also not sure everybody will agree that my way is the 'best' way). Regards, Martin. #-#-# Martin J. Du"rst, Assoc. Professor, Aoyama Gakuin University #-#-# http://www.sw.it.aoyama.ac.jp mailto:duerst@it.aoyama.ac.jp