[GRASS-dev] more on locale problem

Michael Barton Michael.Barton at asu.edu
Thu Jul 26 12:03:06 PDT 2012


I was worried that there might be 2 problems compounded here, but no longer think so. 

Yesterday, I compiled under Snow Leopard and today was able to test on Lion. It runs fine on my Lion machine AFTER manually editing .grassrc6 and adding 

LANG: en_US.UTF-8

The fact that this is needed is a problem in itself, but does provide a workaround but seemingly only to a US English machine. A computer with Spanish (or other?) localization will still bomb. This is ironic, of course, since the changes were designed to improve multi-lingual capabilities of GRASS. But this is what happens with such a complex system (a great, if annoying, example of CAS emergent effects). 

William Kyngesburye has a promising diagnosis that the issue lies with LC_CTYPE. Somehow, this is set incorrectly for your and Carlos' machine with a "UTF-8" designation instead of a "UTF8" designation. But I don't know how it got set badly or how to change it to test this hypothesis.

Hopefully others can suggest the beginnings of a solution to test.

Michael


On Jul 26, 2012, at 3: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 <Michael.Barton at asu.edu> 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
>> _____________________
>> C. Michael Barton
>> Visiting Scientist, Integrated Science Program
>> National Center for Atmospheric Research &
>> University Consortium for Atmospheric Research
>> 303-497-2889 (voice)
>> 
>> Director, Center for Social Dynamics & Complexity
>> Professor of Anthropology, School of Human Evolution & Social Change
>> Arizona State University
>> www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu<http://csdc.asu.edu/>
>> 
>> 
>> 
>> 
>> 
> 
> 
> 
> 
> 

_____________________
C. Michael Barton
Visiting Scientist, Integrated Science Program
National Center for Atmospheric Research &
University Consortium for Atmospheric Research
303-497-2889 (voice)

Director, Center for Social Dynamics & Complexity 
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu







More information about the grass-dev mailing list