Why is preferred encoding ascii in wingdb?

7 weeks ago by

I'm running Python3 in Wing Pro 6.0.4-1 on OS X, and I've noticed that locale.getpreferredencoding() returns 'US-ASCII' when run from within Wing (sys.executable == '/Applications/WingIDE.app/Contents/Resources/wingdb'). When I run from within the terminal locale.getpreferredencoding() returns 'UTF-8', as I'd expect. 


Why is this? Is there a way to configure Wing to use UTF-8?


I discovered this because the click package complains when I try to execute a package that uses it in wing. 

add commentfollow this post modified 7 weeks ago by Wingware Support   • written 7 weeks ago by Tom  

1 Answer

7 weeks ago by

On OS X Wing picks up a different env configuration when started from the Finder than if you start it from the command line, which you can do by using /Applications/WingIDE.app/Contents/Resources/wing (optionally with --new option to start a 2nd+ instance).

That said, I think with the click package the best approach is just to define LC_ALL=en_US.utf-8 (or whichever value you want) in your Environment in Project Properties, from the Project menu.  That way it's explicit and works regardless of which environment Wing inherits.

add comment written 7 weeks ago by Wingware Support  
Please log in to add an answer/comment or follow this question.

Share this question

Similar posts:
Search »