Detecting and handling unicode support
I've read the best practices and various unicode issues in the repo, but I'm still a bit unclear on the best way to handle both unicode and non-unicode consoles.
For example, best practices states that "Windows Terminal supports Unicode". But when I inspect the profile capabilities on this terminal, unicode is set to false.
I can get it to set to true if I put System.Console.OutputEncoding = Encoding.UTF8; at the start of the program and when I do this the output renders perfectly. The problem is that this will then change the encoding for consoles which don't natively support unicode (e.g. cmd) and the rendering is not as good (e.g. rounded panels which don't align instead of a straight border).
I was hoping I could use the unicode capability and then opt in to certain features in code based on this . I.e. set the OutputEncoding only if the encoding capability is true.
Windows Terminal supports Unicode, but only if the output encoding is unicode. Not really much that can be done about it afaik.