Ask Your Question
1

Why is preferred encoding ascii in wingdb?

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

Tom gravatar image

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

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.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

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

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

Wingware Admin gravatar image

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.

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

2 followers

Stats

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

Seen: 395 times

Last updated: Mar 07