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/
-----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----- enigmail. mozdev. org/
nv2sACgkQJdeBCY SNAAOu7QCaA9H+ qhXRjrUx7YPSJhd MPgp6 QR3duFbMArr5baf FR
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAk5
3sEAoM9jNkmeKk6
=oLNa
-----END PGP SIGNATURE-----