Code review comment for lp:~jameinel/tarmac/non_ascii-750930

Revision history for this message
John A Meinel (jameinel) wrote :

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

On 09/07/2011 03:15 PM, Rodney Dawes wrote:
> I'm not sure how I feel about this. GCC is using the fancy quotes because the locale you're compiling under is en_US.UTF-8 presumably (as you are presumably running this as a live logged-in user). If GCC runs under the C locale, it uses pure ASCII for error/warning messages. And, as you pointed out, this will still fail if under a UTF-8-incompatible locale, such as Russian KOI8-R. I wonder if a better solution might be to force the locale to be C inside tarmac.
>

If it is a C locale, then .decode('UTF-8') will still work.

Yes, it will fail for other locales, and yes there are ways to detect it.

This still solves 90% of the cases without having to do more work.

John
=:->

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

iEYEARECAAYFAk5nv2sACgkQJdeBCYSNAAOu7QCaA9H+qhXRjrUx7YPSJhdMPgp6
3sEAoM9jNkmeKk6QR3duFbMArr5bafFR
=oLNa
-----END PGP SIGNATURE-----

« Back to merge proposal