Ask Your Question

Why is preferred encoding ascii in wingdb?

asked 2017-04-30 02:41:00 -0600

Tom's avatar

updated 2019-03-13 10:18:52 -0600

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/').

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.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2017-05-01 09:02:00 -0600

updated 2019-03-07 07:12:24 -0600

Wingware Admin's avatar

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/ (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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2017-04-30 02:41:00 -0600

Seen: 2,287 times

Last updated: Mar 07 '19