GNU bug report logs -
#12051
24.1; rcirc-send-message doesn't take multibyte into account.
Previous Next
Reported by: Li Ian-Xue <b4283 <at> bephor.org>
Date: Thu, 26 Jul 2012 01:17:02 UTC
Severity: normal
Found in version 24.1
Done: Leo <sdl.web <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #52 received at 12051 <at> debbugs.gnu.org (full text, mbox):
> From: Leo <sdl.web <at> gmail.com>
> Cc: 12051 <at> debbugs.gnu.org
> Date: Thu, 16 Aug 2012 11:16:04 +0800
>
> On 2012-08-16 10:50 +0800, Eli Zaretskii wrote:
> >> By worst expansion, do you mean assuming each char to be 5 bytes?
> >
> > Yes.
>
> The will split English text at the boundary of 84 chars which seems
> sub-optimal.
Why is it suboptimal? (I don't know anything about rcirc.)
If it's important to be better in this case, you could detect it
(e.g., by matching the string against [:ascii:]).
Another ide is to use string-bytes to find out where to break a string
on a character boundary without exceeding the maximum allowed byte
count in a message.
> In the current implementation of rcirc-split-message, the inner loop
> might not be run if the encoding is utf-8, which we can assume to be 90%
> of the cases. So my suggestion is to leave it alone until we hit a real
> case of inefficiency. What do you think?
I'm okay with the current code if you are, but I still think a more
elegant solution should be possible.
This bug report was last modified 12 years and 284 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.