From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#12051: 24.1; rcirc-send-message doesn't take multibyte into account. Date: Wed, 15 Aug 2012 05:57:55 +0300 Message-ID: <83628kkgjw.fsf@gnu.org> References: <87boj3byqy.fsf@acerpad.localdomain> <83k3x1jx3p.fsf@gnu.org> <874no4apau.fsf@acerpad.localdomain> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1344999507 6080 80.91.229.3 (15 Aug 2012 02:58:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 15 Aug 2012 02:58:27 +0000 (UTC) Cc: 12051@debbugs.gnu.org To: Li Ian-Xue Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 15 04:58:28 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T1ToP-00019F-Vz for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 Aug 2012 04:58:26 +0200 Original-Received: from localhost ([::1]:39975 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1ToP-0000LM-4v for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Aug 2012 22:58:25 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59689) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1ToM-0000LE-Dm for bug-gnu-emacs@gnu.org; Tue, 14 Aug 2012 22:58:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1ToL-0008Hc-Hb for bug-gnu-emacs@gnu.org; Tue, 14 Aug 2012 22:58:22 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47827) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1ToL-0008HV-ER for bug-gnu-emacs@gnu.org; Tue, 14 Aug 2012 22:58:21 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1T1Twj-0004dj-Sm for bug-gnu-emacs@gnu.org; Tue, 14 Aug 2012 23:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Aug 2012 03:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12051 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12051-submit@debbugs.gnu.org id=B12051.134499999617800 (code B ref 12051); Wed, 15 Aug 2012 03:07:01 +0000 Original-Received: (at 12051) by debbugs.gnu.org; 15 Aug 2012 03:06:36 +0000 Original-Received: from localhost ([127.0.0.1]:57372 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T1TwI-0004d1-U0 for submit@debbugs.gnu.org; Tue, 14 Aug 2012 23:06:36 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:42733) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T1TwG-0004cs-Gl for 12051@debbugs.gnu.org; Tue, 14 Aug 2012 23:06:33 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0M8R00B00ZSQVO00@a-mtaout21.012.net.il> for 12051@debbugs.gnu.org; Wed, 15 Aug 2012 05:57:50 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M8S00B1F08DVB20@a-mtaout21.012.net.il>; Wed, 15 Aug 2012 05:57:50 +0300 (IDT) In-reply-to: <874no4apau.fsf@acerpad.localdomain> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:63182 Archived-At: > From: Li Ian-Xue > Date: Wed, 15 Aug 2012 09:59:05 +0800 > > Eli Zaretskii writes: > > > Isn't it better and simpler to split the string after it is encoded > > inside rcirc-send-string? > But by then one wouldn't know at which byte to cut. For example when > it's a multibyte-ascii mixed string. You can always stop at known characters, like whitespace. Anyway, another way is simply to assume the worst possible expansion ratio, and estimate the byte count before encoding.