H
Harald van Dijk
Thanks a lot!
That changes output a bit.
\x2500 is shown as a blank
\u2500 is not shown at all
That is odd. \x2500 and \u2500 should map to the same character on
your system. I suggested the \u form because for U+1xxxx, and for
extended characters in non-wide character strings, it is far more
readable than specifying the representation, plus you get better
diagnostics if you specify an invalid character, but in this case they
should behave the same.
I am still searching what is the right parameter for setlocale
(http://www.wolf-fuerth.de/charmap.png)
Often you can use setlocale(LC_ALL, ""), meaning "whatever locale the
user has set up", and in this case you probably should. You shouldn't
force an UTF-8 encoding: if the user is on an ISO-8859-1 terminal, and
you start outputting UTF-8 bytes, the user will just get garbage.