Skip to content

Commit 734cf87

Browse files
committed
Set Console.OutputEncoding to UTF-8
Setting the OutputEncoding to Unicode caused characters to be written incorrectly in some cases. UTF-8 is the correct setting.
1 parent af4bd29 commit 734cf87

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/PowerShellEditorServices/Session/SessionPSHostUserInterface.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ public ConsoleServicePSHostUserInterface(bool enableConsoleRepl)
5757
{
5858
if (enableConsoleRepl)
5959
{
60-
// Set the output encoding to Unicode so that all
61-
// Unicode characters are written correctly
62-
System.Console.OutputEncoding = System.Text.Encoding.Unicode;
60+
// Set the output encoding to UTF-8 so that special
61+
// characters are written to the console correctly
62+
System.Console.OutputEncoding = System.Text.Encoding.UTF8;
6363
}
6464

6565
this.rawUserInterface =

0 commit comments

Comments
 (0)