* unencodable-char-position bug?
@ 2006-02-14 22:19 Paul Pogonyshev
2006-02-15 2:36 ` Kenichi Handa
0 siblings, 1 reply; 5+ messages in thread
From: Paul Pogonyshev @ 2006-02-14 22:19 UTC (permalink / raw)
Hi,
Is it correct that
(unencodable-char-position 0 1 'utf-8 nil "ы")
evaluates to 0? Since UTF-8 can encode anything, I presume the
correct return value would be nil... The result is the same if
tried on a Russian letter character in a buffer instead of a
string.
In general, what is the best way to determine if given character
is encodable in given coding system?
Paul
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: unencodable-char-position bug?
2006-02-14 22:19 unencodable-char-position bug? Paul Pogonyshev
@ 2006-02-15 2:36 ` Kenichi Handa
2006-02-15 20:48 ` Paul Pogonyshev
0 siblings, 1 reply; 5+ messages in thread
From: Kenichi Handa @ 2006-02-15 2:36 UTC (permalink / raw)
Cc: emacs-devel
In article <200602150019.25230.pogonyshev@gmx.net>, Paul Pogonyshev <pogonyshev@gmx.net> writes:
> Is it correct that
> (unencodable-char-position 0 1 'utf-8 nil "ы")
> evaluates to 0?
No. But my Emacs (CVS HEAD) evaluates that to nil, which is
correct. Which version of Emacs are you using?
> In general, what is the best way to determine if given character
> is encodable in given coding system?
Using unencodable-char-position is good. You can also use
these:
(memq 'SOME_CODING_SYSTEM (find-coding-systems-region FROM TO))
or
(memq 'SOME_CODING_SYSTEM (find-coding-systems-string STRING))
---
Kenichi Handa
handa@m17n.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: unencodable-char-position bug?
2006-02-15 2:36 ` Kenichi Handa
@ 2006-02-15 20:48 ` Paul Pogonyshev
2006-02-17 12:43 ` Kenichi Handa
0 siblings, 1 reply; 5+ messages in thread
From: Paul Pogonyshev @ 2006-02-15 20:48 UTC (permalink / raw)
Cc: Kenichi Handa
Kenichi Handa wrote:
> In article <200602150019.25230.pogonyshev@gmx.net>, Paul Pogonyshev <pogonyshev@gmx.net> writes:
>
> > Is it correct that
>
> > (unencodable-char-position 0 1 'utf-8 nil "ы")
>
> > evaluates to 0?
>
> No. But my Emacs (CVS HEAD) evaluates that to nil, which is
> correct. Which version of Emacs are you using?
Just update to CVS HEAD, the same result, zero. Weird...
> > In general, what is the best way to determine if given character
> > is encodable in given coding system?
>
> Using unencodable-char-position is good. You can also use
> these:
>
> (memq 'SOME_CODING_SYSTEM (find-coding-systems-region FROM TO))
> or
> (memq 'SOME_CODING_SYSTEM (find-coding-systems-string STRING))
This works, i.e. (memq 'mule-utf-8 (find-coding-systems-string "ы"))
evaluates to non-nil...
Paul
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: unencodable-char-position bug?
2006-02-15 20:48 ` Paul Pogonyshev
@ 2006-02-17 12:43 ` Kenichi Handa
2006-02-17 19:11 ` Paul Pogonyshev
0 siblings, 1 reply; 5+ messages in thread
From: Kenichi Handa @ 2006-02-17 12:43 UTC (permalink / raw)
Cc: emacs-devel
In article <200602152248.59556.pogonyshev@gmx.net>, Paul Pogonyshev <pogonyshev@gmx.net> writes:
>> > Is it correct that
>>
>> > (unencodable-char-position 0 1 'utf-8 nil "ы")
>>
>> > evaluates to 0?
>>
>> No. But my Emacs (CVS HEAD) evaluates that to nil, which is
>> correct. Which version of Emacs are you using?
> Just update to CVS HEAD, the same result, zero. Weird...
Very weird... Does someone else reproduce this bug?
---
Kenichi Handa
handa@m17n.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: unencodable-char-position bug?
2006-02-17 12:43 ` Kenichi Handa
@ 2006-02-17 19:11 ` Paul Pogonyshev
0 siblings, 0 replies; 5+ messages in thread
From: Paul Pogonyshev @ 2006-02-17 19:11 UTC (permalink / raw)
Cc: Kenichi Handa
Kenichi Handa wrote:
> In article <200602152248.59556.pogonyshev@gmx.net>, Paul Pogonyshev <pogonyshev@gmx.net> writes:
>
> >> > Is it correct that
> >>
> >> > (unencodable-char-position 0 1 'utf-8 nil "ы")
> >>
> >> > evaluates to 0?
> >>
> >> No. But my Emacs (CVS HEAD) evaluates that to nil, which is
> >> correct. Which version of Emacs are you using?
>
> > Just update to CVS HEAD, the same result, zero. Weird...
>
> Very weird... Does someone else reproduce this bug?
Can you give me some debugging hints? I could try to look into it,
but I'm not familiar with Emacs C code.
Paul
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-02-17 19:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-14 22:19 unencodable-char-position bug? Paul Pogonyshev
2006-02-15 2:36 ` Kenichi Handa
2006-02-15 20:48 ` Paul Pogonyshev
2006-02-17 12:43 ` Kenichi Handa
2006-02-17 19:11 ` Paul Pogonyshev
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.