[MERGE] UTF-8 encoding in binary diffs

John Arbash Meinel john at arbash-meinel.com
Wed Jul 11 16:35:28 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Pool wrote:
> On 7/6/07, Aaron Bentley <aaron.bentley at utoronto.ca> wrote:
>> Aaron Bentley has voted +0.
>> Status is now: Waiting
>> Comment:
>> Thanks.  I'm surprised your test case uses utf-8 for the filenames.
>> That could conceivably break on non-utf8 filesystems.  Better to use
>> unicode strings, I think.  But then you do need to make sure the test is
>> skipped on non-unicode filesystems.
> 
> Aaron is quite right, this does break if run with LANG=C, so it hasn't
> merged yet.
> 
> (My vote before was meant to mean "this isn't totally right, but it's
> better than what we have now, so let's merge it.")
> 
> Is there a standard way to skip tests that can't run because of the
> filesystem encoding?  I'm sure there must already be some but I can't
> see it.
> 

try:
  self.build_tree(u'unicode\u03a9')
except UnicodeError:
  raise TestSkipped('Platform cannot represent unicode characters')

It isn't what I would prefer, but that is what we have been using.
John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGlPjAJdeBCYSNAAMRAmAJAKCNDWBtBDwkIbESm+QS/iCiaJ+mIACgqBPm
INpZ1iUZ3WGMYR72ghNn3s4=
=tbyh
-----END PGP SIGNATURE-----



More information about the bazaar mailing list