简体   繁体   中英

Get rid of unicode characters in VSCode Interactive Python Environment

I'm using VSCode Version: 1.46.1 on Mac OS Catalina. I'm using the built-in Python interactive terminal Python 3.7.4 Whenever I print strings, it shows up with unicode, making it difficult to read, like so:

\\u201cI like what we have.\\u201d It is quiet and there is somebody else in the room. I tell my dog that I need to go and he says, \\u201cjust alright.\\u201d ~~I am hungry.\\n\\n

I have tried every flavor of un-escaping escaped characters. See here:

Unescaping escaped characters in a string using Python 3.2

And

Using unicode character u201c

But to no avail. I think the problem lies in the encoding options built into VSCode itself, but I'm not sure how to modify that.

Maybe this page could provide some information for you.

"\“" and "\”" means “ and ”, but they will not work, they should be "\“" and "\”".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM