Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/list/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows 为什么在VSCode的PowerShell内部和外部中对unicode字符的行为不同?_Windows_Visual Studio Code_Unicode_Powershell 5.0 - Fatal编程技术网

Windows 为什么在VSCode的PowerShell内部和外部中对unicode字符的行为不同?

Windows 为什么在VSCode的PowerShell内部和外部中对unicode字符的行为不同?,windows,visual-studio-code,unicode,powershell-5.0,Windows,Visual Studio Code,Unicode,Powershell 5.0,我想知道为什么VSCode中的内部PoweShell窗口正确显示unicode符号(如绿色复选标记),而外部PowerShell仅显示一个框 我的目标是,像绿色复选标记这样的unicode符号即使在VSCode之外也能正确显示 为了实现这一点,我在外部PowerShell(5.1-Win10)中做了很多尝试: 据我所知,更改了支持这些符号的字体 将Windows默认编码切换为65001(UTF-8)。-测试版功能已在中解释 还可以将$outpunecoding变量设置为新对象-typename

我想知道为什么VSCode中的内部PoweShell窗口正确显示unicode符号(如绿色复选标记),而外部PowerShell仅显示一个框

我的目标是,像绿色复选标记这样的unicode符号即使在VSCode之外也能正确显示

为了实现这一点,我在外部PowerShell(5.1-Win10)中做了很多尝试:

  • 据我所知,更改了支持这些符号的字体
  • 将Windows默认编码切换为65001(UTF-8)。-测试版功能已在中解释
  • 还可以将
    $outpunecoding
    变量设置为
    新对象-typename System.Text.UTF8Encoding
    ,就像上面的回答中所说的那样
当我将显示的不正确文本从外部Powershell复制到文本编辑器时,符号将正确显示。因此,它必须与字体有关

有人有想法吗?
VSCode用于内部PowerShell终端的字体是哪个?

Windows中的默认终端是
conhost.exe
,它非常古老,甚至不支持Unicode,请参阅