Bug 84938 - x11/rxvt-unicode incorrectly handles incomplete valid multibyte character sequences
Summary: x11/rxvt-unicode incorrectly handles incomplete valid multibyte character seq...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Thierry Thomas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-15 07:10 UTC by Li-Lun Wang
Modified: 2005-08-15 22:28 UTC (History)
0 users

See Also:


Attachments
file.diff (765 bytes, patch)
2005-08-15 07:10 UTC, Li-Lun Wang
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Li-Lun Wang 2005-08-15 07:10:06 UTC
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.
Comment 1 Rong-En Fan 2005-08-15 08:37:19 UTC
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
Comment 2 Thierry Thomas freebsd_committer freebsd_triage 2005-08-15 18:40:25 UTC
Responsible Changed
From-To: freebsd-ports-bugs->thierry


My port.
Comment 3 Thierry Thomas freebsd_committer freebsd_triage 2005-08-15 22:27:56 UTC
State Changed
From-To: open->closed


Committed, thanks!