我正在尝试在 powershell 中以英文显示错误,以便我可以更轻松地在线搜索它们。
\n当出现错误时,它会以法语显示,如下所示:
\nPS C:\\Users\\Olivier\\lpthw> type nul > ex2.py\ntype : Impossible de trouver le chemin d'acc\xc3\xa8s \xc2\xab\xc2\xa0C:\\Users\\Olivier\\lpthw\\nul\xc2\xa0\xc2\xbb, car il n'existe pas.\nAu caract\xc3\xa8re Ligne:1 : 1\n+ type nul > ex2.py\n+ ~~~~~~~~~~~~~~~~~\n + CategoryInfo : ObjectNotFound: (C:\\Users\\Olivier\\lpthw\\nul:String) [Get-Content], ItemNotFoundException\n + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand\n
Run Code Online (Sandbox Code Playgroud)\n