Operating System - Linux
1827837 Members
1498 Online
109969 Solutions
New Discussion

Re: Where is the mbrtowc() function?

 
Ken Stailey
Frequent Advisor

Where is the mbrtowc() function?

/usr/include/wchar.h has the prototype for mbrtowc() but wraps it in confusing #ifdefs.

What defines must be set in order to enable it?

Thanks.
2 REPLIES 2
Ken Stailey
Frequent Advisor

Re: Where is the mbrtowc() function?

Some more details. I want to compile rxvt unicode from

http://software.schmorp.de/pkg/rxvt-unicode.html

I have perl 5.8 but it is compiled with GCC not aCC so I must use GCC.

GCC has some weirdness with mbrtowc() but I found this works:

PATH=/usr/local/bin:/opt/gnudev/bin:$PATH CPPFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_INCLUDE__STDC_A1_SOURCE -D_GLIBCXX_HAVE_MBSTATE_T" ./configure

where /usr/local/bin/perl is the 5.8 one built with GCC and gcc, gcc++, etc are in /opt/gnudev/bin

Now the problem is that ioctl(... TIOCSCTTY ...) doesn't exist on HP-UX but I think I can find an equivalent.
Ken Stailey
Frequent Advisor

Re: Where is the mbrtowc() function?

I gave up on building a Unicode rxvt since even after it linked the binary would not start.

I lost interest when I found that existing terminal emulators could do Japanese Unicode.

This web page http://docs.hp.com/en/B1171-90079/ch27s02.html suggests using

LANG=ja_JP.SJIS hpterm -fn "*-18-:*"

but hpterm doesn't work over an SSH tunnel. However I found that

LANG=ja_JP.SJIS dtterm

does work over an ssh tunnel and does Japanese Unicode.