I get nothing for either LC_CTYPE or LC_ALL (haven't had a chance to check with
Carlos yet). But he's getting an error in python that UTF-8 is unrecognized.
Looking at my machine, it comes up en_US.UTF8 (no hyphen).
On my computer...
anthgradpc7:~ cmbarton$ python
Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getdefaultlocale()
('en_US', 'UTF8')
[same answer in Python 2.7 on Lion]
On Carlos' computer
>>> import locale
>>> locale.getdefaultlocale()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py",
line 496, in getdefaultlocale
File
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py",
line 428, in _parse_localename
ValueError: unknown locale: UTF-8
The GRASS wx GUI calls locale.getdefaultlocale() in ghelp.py
Michael
______________________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University
Tempe, AZ 85287-2402
USA
voice: 480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax: 480-965-7671(SHESC), 480-727-0709 (CSDC)
www: http://csdc.asu.edu, http://shesc.asu.edu
http://www.public.asu.edu/~cmbarton
On Jul 26, 2012, at 3:58 PM, Agustín Diez Castillo wrote:
> On machines that respond to locale in the terminal with
> to LC_CTYPE="en_US.UTF-8"
> I got into no trouble, including Mountain Lion
> But when locale answer
> to LC_CTYPE="C"
>
> ________________________________
> Agustin
>
> On 26/07/2012, at 22:13, Michael Barton <[email protected]> wrote:
>
>> So this is getting narrowed down. Another question is does this just pop up
>> as a bug with effects on the GUI in Lion or does it happen in Snow Leopard
>> too? So far my tests have not been extensive enough.
>>
>> 2 Spanish computers with Lion: bad
>> 1 English computer with Lion: good
>> 1 English computer with Snow Leopard: good
>>
>>
>> On Jul 26, 2012, at 12:00 PM, <[email protected]>
>> wrote:
>>
>>> From: William Kyngesburye <[email protected]>
>>> Date: July 26, 2012 6:26:47 AM MST
>>> To: Michael Barton <[email protected]>, Agustin Angel Diez Castillo
>>> <[email protected]>
>>> Cc: Martin Landa <[email protected]>, Glynn Clements
>>> <[email protected]>, GRASS developers grass-developers
>>> <[email protected]>
>>> Subject: Re: [GRASS-dev] more on locale problem
>>> Reply-To: William Kyngesburye <[email protected]>
>>>
>>>
>>> As you mentioned Michael, there was discussion of this problem a few times
>>> in the past.
>>>
>>> The problem setting is not LANG, though, it's LC_CTYPE. The system is
>>> somehow setting that to "UTF-8", and Python checks LC_CTYPE (and LC_ALL
>>> next) before it checks LANG, so setting LANG in GRASS won't help, as
>>> Agustin found.
>>>
>>>
>>> On Jul 26, 2012, at 5:03 AM, Agustin Angel Diez Castillo wrote:
>>>
>>>> Michael and others,
>>>> Michael's 6.4.3 menus aren't working here, I did try adding
>>>> en_US.UTF-8
>>>> to .grassrc6 but the complaints are the same
>>>> ############################
>>>> ERROR: unknown locale: UTF-8
>>>> ERROR: unknown locale: UTF-8
>>>> ERROR: unknown locale: UTF-8
>>>> ERROR: unknown locale: UTF-8
>>>> ERROR: unknown locale: UTF-8
>>>> ERROR: unknown locale: UTF-8
>>>> 2012-07-26 11:56:43.011 Python[1916:e0f] CFURLCreateWithString was passed
>>>> this invalid URL string:
>>>> '/System/Library/CoreServices/CommonCocoaPanels.bundle' (a file system
>>>> path instead of an URL string). The URL created will not work with most
>>>> file URL functions. CFURLCreateWithFileSystemPath or
>>>> CFURLCreateWithFileSystemPathRelativeToBase should be used instead.
>>>> ############################
>>>> by the way my system preferences are set to english but the region is set
>>>> to Spain.
>>>> cli is working
>>>> As you know in R the language is forced with
>>>> defaults write org.R-project.R force.LANG en_US.UTF-8
>>>> Is there something similar in GRASS?
>>>> A
>>>> On Thursday, July 26, 2012 08:16 CEST, Michael Barton
>>>> <[email protected]> wrote:
>>>>
>>>>> So I am now completely baffled as to why GRASS is not working on my
>>>>> colleague's computer. it is a pretty new MacBook (last 6 months) and he
>>>>> has not installed much on it--Office, Mendeley. It is running the most
>>>>> current version of Lion (10.7.4).
>>>>>
>>>>> There are repeated problems with locale on it. Here is an example that
>>>>> works fine on my computer also running Lion.
>>>>>
>>>>> import locale
>>>>> locale.getdefaultlocale()
>>>>> Traceback (most recent call last):
>>>>> File "<stdin>", line 1, in <module>
>>>>> File
>>>>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py",
>>>>> line 496, in getdefaultlocale
>>>>> File
>>>>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py",
>>>>> line 428, in _parse_localename
>>>>> ValueError: unknown locale: UTF-8
>>>>>
>>>>> I don't know where it is getting UTF-8. The GUI code in GRASS calls the
>>>>> language en_ES.UTF-8, but this is running Python outside of GRASS. I've
>>>>> tried setting locale to es_EN, and to C. But we still get this error when
>>>>> locale.getdefaultlocale() is run in wx GUI.
>>>>>
>>>>> Any ideas?????
>>>>>
>>>>> Michael
>>>
>>> -----
>>> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
>>> http://www.kyngchaos.com/
>>>
>>> First Pogril: Why is life like sticking your head in a bucket filled with
>>> hyena offal?
>>> Second Pogril: I don't know. Why IS life like sticking your head in a
>>> bucket filled with hyena offal?
>>> First Pogril: I don't know either. Wretched, isn't it?
>>>
>>> -HitchHiker's Guide to the Galaxy
>>>
>>>
>>
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev