First time here? Check out the FAQ!
1

Why is preferred encoding ascii in wingdb?

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.

Tom's avatar
21
Tom
asked 2017-04-30 02:41:00 -0600
Wingware Support's avatar
4.2k
Wingware Support
updated 2019-03-13 10:18:52 -0600
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

1

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.

Wingware Support's avatar
4.2k
Wingware Support
answered 2017-05-01 09:02:00 -0600
Wingware Admin's avatar
231
Wingware Admin
updated 2019-03-07 07:12:24 -0600
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer