>>>>> On Wed, 27 Oct 2010 23:56:47 +0900, Keitaro Miyazaki said: > Yes, NSString counts length of string as number of Unicode characters, > and I suppose range is counted in a similar way. > "... The length method returns the total number of Unicode > characters in the string ..." > NSString Class Reference > In this context, "number of Unicode characters" should be read as "number of `unichar' values", where the type `unichar' is of 16-bit width. Actually, it is confusing. Also, selected range handling is not enough for the following case: (activate Kotoeri) a i u e o left left left The first screenshot is for the NS port with your patch, and the second one is for my Mac port (http://lists.gnu.org/archive/html/emacs-devel/2010-09/msg01439.html). YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp