Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

OpenWatcom v1.9 for Linux vs. unicode

20 views
Skip to first unread message

ed_d...@yahoo.com

unread,
May 30, 2019, 6:48:38 PM5/30/19
to
Using OpenWatcom v1.9 for Linux, how do I print unicode characters to a terminal (xterm)? Using gcc 4.8.2 on Ubuntu, the following works:

#include <stdio.h>

int main() {
printf("hello, world\n");
printf("\u2500\u2501\u25b6\u25ba\u27a4\n");
return 0;
}

Printing: hello, world Then some unicode characters on the next line.

But when I use OW v1.9, it just prints:

hello, world u2500u2501

Thanks for any help!

Paul S Person

unread,
May 31, 2019, 12:36:40 PM5/31/19
to
The OpenWatcom C/C++ User's Guide actually has a sectiom named
"Double-Byte/Unicode Characters", although it's not in the index (for
the HTMLHelp version anyway). I found it by finding "exception" in the
index, selecting "C++ Exception Handling", and pressing "Next" enough
times. This can also be found from the Menu, under compiler options
and the the "full description" part.

The compiler options listed are
zk{0,1,2,l}
zk0u
zku=<codepage>

perhaps one or another of them would help.
--
"I begin to envy Petronius."
"I have envied him long since."
0 new messages