[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug 130397

From: Kenichi Handa
Subject: Re: Bug 130397
Date: Thu, 13 Jan 2005 16:50:20 +0900 (JST)
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3.50 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI)

In article <address@hidden>, David Kastrup <address@hidden> writes:
>>>  If ispell wants utf-8, it's easy enough to convert each input line to
>>>  utf-8 and deal with offsets into that in the event of a mispelling;
>>  Or account for byte offsets by (variable) multibyte lenght of each
>>  character, which Emacs knows.  I don't remember for the moment whether
>>  the multibyte length of the UTF-8 encoding can be gotten at by a Lisp
>>  program, but if not, we could add some primitive to do that.

> Just encode the line to utf-8, find the correct point in the byte
> string, cut off the line there, convert back and check the length of
> the string.  This works unless you are in the middle of a character.

> But it would be much saner if our conversion facilities would preserve
> markers (which they don't do right now): encode to utf-8, place a
> marker at the right byte offset, undo the conversion.

You can encode a text to utf-8, place several makers, encode
regions between markers one by one.

Ken'ichi HANDA

reply via email to

[Prev in Thread] Current Thread [Next in Thread]