[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug 130397
From: |
Stefan Monnier |
Subject: |
Re: Bug 130397 |
Date: |
Tue, 04 Jan 2005 23:42:15 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) |
>> Why can't ispell.el just use the `w' syntax to decide what is a word and
>> then rely on the decoding/encoding to do the rest of the work?
>> That would fix the problem where a word like "expérience" is checked as two
>> words if the dictionary is "american".
> That will cause another problem. For instance, when we have
> "español" in a buffer and the ispell dictionary is czech
> (latin-2), as "español" is encoded into "espa?ol" by
> latin-2, it causes the error "Ispell and its process have
> different character maps" because ispell returns the result
> of two words "eapa" and "ol".
But ispell.el should be able to automatically check whether the chars can be
safely encoded with the coding-system and if not (as in your example),
ispell.el will know that the word can't be checked by ispell and should
just be skipped (and maybe marked as "uncheckable").
>>> + (string-as-multibyte
>>> + (mapconcat
>>> + #'(lambda (c)
>>> + (let ((unichar (aref ucs-mule-8859-to-mule-unicode c)))
>>> + (if unichar
>>> + (aref ispell-unified-chars-table unichar)
>>> + (string c))))
>>> + str ""))))
>> Do you expect the output of mapconcat to be unibyte and to contain
>> emacs-mule encoding of multibyte chars?
> No. STR may be an ASCII-only string, in which case, the
> result of mapconcat is a unibyte ASCII-only string. I'd
> like to change it to a multibyte ASCII-only stirng to avoid
> converting STR again and again in such a case.
Then string-to-multibyte sounds like a safer choice.
`string-as-multibyte' has very strange semantics, I recommend we avoid it as
much as possible.
Stefan
- Re: Bug 130397 (Was: Emacs - Ispell problem with i[no]german dictionary), Kenichi Handa, 2005/01/04
- Re: Bug 130397, Stefan, 2005/01/04
- Re: Bug 130397, Kenichi Handa, 2005/01/04
- Re: Bug 130397,
Stefan Monnier <=
- Re: Bug 130397, Kenichi Handa, 2005/01/05
- Re: Bug 130397, Stefan Monnier, 2005/01/05
- Re: Bug 130397, Kenichi Handa, 2005/01/05
- Re: Bug 130397, Ken Stevens, 2005/01/06
- Re: Bug 130397, Stefan Monnier, 2005/01/06
- Re: Bug 130397, Kenichi Handa, 2005/01/06
- Re: Bug 130397, Agustin Martin, 2005/01/07
- Re: Bug 130397, Geoff Kuenning, 2005/01/08
- Re: Bug 130397, David Kastrup, 2005/01/08
- Re: Bug 130397, Miles Bader, 2005/01/09