On Sat, Feb 23, 2008 at 08:35:15PM -0800, Michael G Schwern wrote: > I just merged together a number of tickets having to do with Test::More not > liking wide characters.
> Wide character in print at lib/Test/Builder.pm line 1252. > ok 1 - Testing ?? > > > I know almost nothing about Unicode. How do I make this Just Work? Is it You can't. It might be that the user's terminal simply cannot display that character. One could get round it by escaping (in some way) all characters that are non- ASCII, for example with \x{} encoding, and also escaping \ (at least) so that all the diagnostic output would be valid for a "" string. > safe to just set binmode to always be ':utf8' if perl > 5.8? Yes, safe from a Perl point of view. But not correct if the user's terminal isn't expecting UTF-8. And wrong if the user's terminal is expecting the same (8 bit) encoding as the script already is in. However, it might be safe enough to invoke the testing Perl with -CLS (set STDIN/STDOUT/STDERR to UTF-8 if the user's locale has UTF-8 in it) which is probably going to be more right more often than anything else. Not sure if -CLS only came in with 5.8.1 Nicholas Clark