Hi,

Thanks for your feedback.

Indeed this locale-related error is not due to Spyder but to MacOS
itself.
Apparently, MacOS -which is a UNIX-like operating system- is using an
invalid LANG (or LC_ALL or LC_CTYPE) environment variable. "UTF-8"
alone is not valid. On the contrary, "en_US.UTF-8" is a correct value
(like "en_GB.UTF-8" for GB, "fr_FR.UTF-8" for France, "es_ES.UTF-8"
for Spain, and so on).

So to fix this, I see two options (I'm not a Mac user I haven't tested
any of this):
1. the solution suggested by Petrush, i.e. adding manually the
environment variables corresponding to your language
2. maybe (again, I did not have the opportunity to test it) unchecking
the "Set LANG environment variable on startup" checkbox in the
Terminal settings, under the "Advanced" tab would fix this too (see
here: 
http://henrik.nyh.se/2007/10/displaying-utf-8-correctly-in-leopard-terminal).

Anyway, I think this not appropriate to include a patch for this in
Spyder as you would encounter this issue outside Spyder too.

Cheers,
Pierre

On Mar 12, 4:11 pm, Petrush <[email protected]> wrote:
> I have finally got spyder to work on mac osx 10.6. Initially I had big
> difficulties to get PyQt4 to work, but after a complete removal and
> compilation with i386 (i'm running 32-bit python) that works.
>
> There is a bug in python/mac/something that makes
> locale.getdefaultlocale() to fail (at least with swedish locale), so I
> needed to set the environment variables in .profile manually:
>
> export LANG=en_US.UTF-8
> export LC_ALL=en_US.UTF-8

-- 
You received this message because you are subscribed to the Google Groups 
"spyder" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/spyderlib?hl=en.

Reply via email to