Using WriteConsoleOutput to write Unicode with c#
问题 I am trying to use the WriteConsoleOutput function from kernel32.dll, however I cannot get unicode characters to display correctly, they always display as the wrong characters. I have attempted to use: Console.OutputEncoding = System.Text.Encoding.UTF8; Changing this to Encoding.Unicode does not work either. [DllImport("kernel32.dll", SetLastError = true)] private static extern bool SetConsoleOutputCP(uint wCodePageID); public void SetCP(){ SetConsoleOutputCP(65001); } I have tried using both