簡體   English   中英

擺脫 VSCode 交互式 Python 環境中的 unicode 字符

[英]Get rid of unicode characters in VSCode Interactive Python Environment

我在 Mac OS Catalina 上使用 VSCode Version: 1.46.1 我正在使用內置的 Python 交互式終端Python 3.7.4每當我打印字符串時,它都會顯示為 unicode,使其難以閱讀,如下所示:

\\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

我已經嘗試了各種無法轉義的轉義字符。 看這里:

使用 Python 3.2 對字符串中的轉義字符進行轉義

使用 unicode 字符 u201c

但無濟於事。 我認為問題在於 VSCode 本身內置的編碼選項,但我不確定如何修改它。

也許這個頁面可以為您提供一些信息。

“\“”和“\””的意思是“和”,但它們不起作用,它們應該是“\“”和“\””。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM