in reply to [OT] ASCII, cmd.exe, linux console, charset, code pages, fonts and other amenities
To play it safe, only print characters in the range 0x20 to 0x7E (inclusive), plus of course \n and \t. What other characters would you want to print?
On Linux, I think you can use ${^UTF8LOCALE} to detect if there is UTF-8 support present, but I'm not an expert on this, there's probably some caveats there. You might just want to ask the user what encoding to use on output, and use e.g. use open qw/:std :encoding(UTF-8)/;
And on Windows... good luck ;-) I think Win32::GetConsoleOutputCP() can tell you the current console's encoding.
Unfortunately I have no experience on custom fonts.
|
|---|