From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.bugs Subject: bug#7282: 23.2; [PATCH] Improve text composition by Input Methods on MacOSX. Date: Thu, 28 Oct 2010 15:35:38 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: dough.gmane.org 1288248232 16327 80.91.229.12 (28 Oct 2010 06:43:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 28 Oct 2010 06:43:52 +0000 (UTC) Cc: 7282@debbugs.gnu.org To: Keitaro Miyazaki Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 28 08:43:51 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PBMDE-000600-AA for geb-bug-gnu-emacs@m.gmane.org; Thu, 28 Oct 2010 08:43:48 +0200 Original-Received: from localhost ([127.0.0.1]:56837 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PBMDD-0007HN-Af for geb-bug-gnu-emacs@m.gmane.org; Thu, 28 Oct 2010 02:43:47 -0400 Original-Received: from [140.186.70.92] (port=59281 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PBMCb-0006w1-6q for bug-gnu-emacs@gnu.org; Thu, 28 Oct 2010 02:43:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PBMCZ-0000wE-K9 for bug-gnu-emacs@gnu.org; Thu, 28 Oct 2010 02:43:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52183) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PBMCZ-0000w9-Gw for bug-gnu-emacs@gnu.org; Thu, 28 Oct 2010 02:43:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PBM1q-0005IX-FG; Thu, 28 Oct 2010 02:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: YAMAMOTO Mitsuharu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Oct 2010 06:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7282 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 7282-submit@debbugs.gnu.org id=B7282.128824749920358 (code B ref 7282); Thu, 28 Oct 2010 06:32:02 +0000 Original-Received: (at 7282) by debbugs.gnu.org; 28 Oct 2010 06:31:39 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PBM1R-0005IJ-Th for submit@debbugs.gnu.org; Thu, 28 Oct 2010 02:31:39 -0400 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PBM1O-0005IB-Re for 7282@debbugs.gnu.org; Thu, 28 Oct 2010 02:31:36 -0400 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 7AFE5C0563; Thu, 28 Oct 2010 15:35:39 +0900 (JST) In-Reply-To: User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?UTF-8?Q?Shij=C5=8D?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 28 Oct 2010 02:32:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:41189 Archived-At: >>>>> On Thu, 28 Oct 2010 15:15:54 +0900, Keitaro Miyazaki said: > Do you mean that there are some cases that the number of characters > in a string, in other words, the length of a string, is different > from the one counted by NSString to the one counted by Emacs? > If so, could you show me any example of these cases? I mentioned "non-BMP characters" in the previous reply. (mapcar 'length (list (string #xffff) (string #x10000))) => (1 1) #import #include main() { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; const char str1[] = {0xef, 0xbf, 0xbf, '\0'}; // U+ffff in UTF-8 const char str2[] = {0xf0, 0x90, 0x80, 0x80, '\0'}; // U+10000 in UTF-8 NSString *string1 = [NSString stringWithUTF8String:str1]; NSString *string2 = [NSString stringWithUTF8String:str2]; printf ("%ld %ld\n", [string1 length], [string2 length]); [pool release]; } => 1 2 YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp