When a multibyte character sequence is valid but incomplete (mbrtowc() returns (size_t)-2), urxvt should set cmdbuf_ptr = cmdbuf_endp. There is a patch in the port making this happen only when __FreeBSD_version>502110. However, __FreeBSD_version is not defined without the inclusion of sys/param.h, making the next call to next_char() incorrectly feed the same string into mbrtowc(), thus returning a (size_t)-1. How-To-Repeat: Install x11/rxvt-unicode on a box of which __FreeBSD_version > 502110. Open urxvt, connect to a somewhat slow host, and read some documents with characters in CJK in UTF-8. Once in a while, some character will be incorrectly interpreted.
I have tried this patch and it indeed solve this problem. I also found that the ``sys/param.h'' was removed in port updated to 4.7. I wonder if this could make into 6.0 release so CJK people can have a happy experience with urxvt :-) Rong-En Fan
Responsible Changed From-To: freebsd-ports-bugs->thierry My port.
State Changed From-To: open->closed Committed, thanks!