On Sep 2, 2008, at 2:45 AM, Allan Odgaard wrote:
|| [...] || and this unexpected result when run from PyMate: || PyMate r8111 running Python 2.5.2 (/usr/bin/env python) >>> loc.py || C/en_US.UTF-8/C/C/C/C || 282929992
| TM itself sets LC_CTYPE since it is only concerned about character | encoding for the processes it launches (for stdin/out).
| If you want to have LC_ALL set for the processes it launches, set it | in Preferences ? Advanced ? Shell Variables.
If TM were setting LC_CTYPE correctly, wouldn't PyMate produce the same output (stdout) as I saw in the shell?
Dave
On 2 Sep 2008, at 19:24, David Peckham wrote:
[...] If TM were setting LC_CTYPE correctly, wouldn't PyMate produce the same output (stdout) as I saw in the shell?
No. You see 6 values, one of them is LC_CTYPE, and that one does show UTF8, the rest however have their default value, because no-one has changed it, and I am not sure it really should be changed (or to what you want it changed to) -- these other values refer to the monetary system, numeric system, language used for messages (catalog files) etc.
There is no way TM would know how to set that correctly up for you, you have to do that yourself, if this is important for you.
It sounds like you set LC_ALL in your shell startup file, you can set that variable in TM as well, and all the values will inherit from that.
Allan,
Thank you for explaining that. I don't set LC_ALL in my .bash_profile, though my environment does have:
LANG=en_US.UTF-8
I'll set LC_ALL in TM to make it match the shell.
Dave
On Sep 3, 2008, at 3:03 AM, Allan Odgaard wrote:
On 2 Sep 2008, at 19:24, David Peckham wrote:
[...] If TM were setting LC_CTYPE correctly, wouldn't PyMate produce the same output (stdout) as I saw in the shell?
No. You see 6 values, one of them is LC_CTYPE, and that one does show UTF8, the rest however have their default value, because no-one has changed it, and I am not sure it really should be changed (or to what you want it changed to) -- these other values refer to the monetary system, numeric system, language used for messages (catalog files) etc.
There is no way TM would know how to set that correctly up for you, you have to do that yourself, if this is important for you.
It sounds like you set LC_ALL in your shell startup file, you can set that variable in TM as well, and all the values will inherit from that.
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On 3 Sep 2008, at 12:09, David Peckham wrote:
Thank you for explaining that. I don't set LC_ALL in my .bash_profile, though my environment does have:
LANG=en_US.UTF-8
Ah, that is a new feature of Leopard’s Terminal. See Preferences → Settings → Advanced.
IMO this ‘feature’ though is misimplemented, it should only set LC_CTYPE (rdar://5564288).
It does however derive the value of the variable from your system locale settings (sometimes with bad results though).