* [emacs-w3m:09920] detect-coding-with-priority
@ 2008-01-11 5:43 Katsumi Yamaoka
2008-01-11 8:00 ` Stephen Berman
2008-01-11 9:59 ` detect-coding-with-priority Kenichi Handa
0 siblings, 2 replies; 6+ messages in thread
From: Katsumi Yamaoka @ 2008-01-11 5:43 UTC (permalink / raw)
To: emacs-devel; +Cc: emacs-w3m
Hi,
I noticed that `detect-coding-with-priority' doesn't work
recently in the Emacs trunk and Unicode-2, though I don't know
when it began.
(with-temp-buffer
(set-buffer-multibyte nil)
(insert (encode-coding-string "あいうえお" 'shift_jis))
(detect-coding-with-priority (point-min) (point-max)
'((coding-category-sjis . shift_jis))))
=> (raw-text no-conversion)
Emacs 22.1 returns (shift_jis emacs-mule raw-text no-conversion)
for this form.
(Emacs-w3m uses this macro for identifying the coding system in
web pages in which the charset is not specified.)
Regards,
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [emacs-w3m:09920] detect-coding-with-priority
2008-01-11 5:43 [emacs-w3m:09920] detect-coding-with-priority Katsumi Yamaoka
@ 2008-01-11 8:00 ` Stephen Berman
2008-01-11 9:59 ` detect-coding-with-priority Kenichi Handa
1 sibling, 0 replies; 6+ messages in thread
From: Stephen Berman @ 2008-01-11 8:00 UTC (permalink / raw)
To: emacs-devel; +Cc: emacs-w3m
On Fri, 11 Jan 2008 14:43:03 +0900 Katsumi Yamaoka <yamaoka@jpl.org> wrote:
> Hi,
>
> I noticed that `detect-coding-with-priority' doesn't work
> recently in the Emacs trunk and Unicode-2, though I don't know
> when it began.
>
> (with-temp-buffer
> (set-buffer-multibyte nil)
> (insert (encode-coding-string "あいうえお" 'shift_jis))
> (detect-coding-with-priority (point-min) (point-max)
> '((coding-category-sjis . shift_jis))))
> => (raw-text no-conversion)
>
> Emacs 22.1 returns (shift_jis emacs-mule raw-text no-conversion)
> for this form.
So does GNU Emacs 23.0.50.4 (i686-pc-linux-gnu, GTK+ Version 2.12.0) of
2008-01-04 on escher, so the change appears to have happened within the
last week.
Steve Berman
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: detect-coding-with-priority
2008-01-11 5:43 [emacs-w3m:09920] detect-coding-with-priority Katsumi Yamaoka
2008-01-11 8:00 ` Stephen Berman
@ 2008-01-11 9:59 ` Kenichi Handa
2008-01-11 11:30 ` detect-coding-with-priority Kenichi Handa
1 sibling, 1 reply; 6+ messages in thread
From: Kenichi Handa @ 2008-01-11 9:59 UTC (permalink / raw)
To: Katsumi Yamaoka; +Cc: emacs-w3m, emacs-devel
In article <b4mabncj4t4.fsf@jpl.org>, Katsumi Yamaoka <yamaoka@jpl.org> writes:
> I noticed that `detect-coding-with-priority' doesn't work
> recently in the Emacs trunk and Unicode-2, though I don't know
> when it began.
> (with-temp-buffer
> (set-buffer-multibyte nil)
> (insert (encode-coding-string "あいうえお" 'shift_jis))
> (detect-coding-with-priority (point-min) (point-max)
> '((coding-category-sjis . shift_jis))))
>>> (raw-text no-conversion)
I think the following change is the culprit.
2008-01-09 Kenichi Handa <handa@ni.aist.go.jp>
* coding.c (detect_coding_iso2022): New arg
latin_extra_code_state. Allow Latin extra codes only
when *latin_extra_code_state is nonzero.
(detect_coding_mask): If there is a NULL byte, detect the encoding
as UTF-16 or binary. If Latin extra codes exist, detect the
encoding as ISO-2022 only when there's no other proper encoding is
found.
I'm now investigating what's wrong.
---
Kenichi Handa
handa@ni.aist.go.jp
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: detect-coding-with-priority
2008-01-11 9:59 ` detect-coding-with-priority Kenichi Handa
@ 2008-01-11 11:30 ` Kenichi Handa
2008-01-11 11:50 ` [emacs-w3m:09929] detect-coding-with-priority Katsumi Yamaoka
0 siblings, 1 reply; 6+ messages in thread
From: Kenichi Handa @ 2008-01-11 11:30 UTC (permalink / raw)
To: Kenichi Handa; +Cc: yamaoka, emacs-w3m, emacs-devel
In article <E1JDGfJ-0003lT-4d@etlken.m17n.org>, Kenichi Handa <handa@ni.aist.go.jp> writes:
> I think the following change is the culprit.
> 2008-01-09 Kenichi Handa <handa@ni.aist.go.jp>
> * coding.c (detect_coding_iso2022): New arg
> latin_extra_code_state. Allow Latin extra codes only
> when *latin_extra_code_state is nonzero.
> (detect_coding_mask): If there is a NULL byte, detect the encoding
> as UTF-16 or binary. If Latin extra codes exist, detect the
> encoding as ISO-2022 only when there's no other proper encoding is
> found.
> I'm now investigating what's wrong.
I've just installed a fix.
---
Kenichi Handa
handa@ni.aist.go.jp
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-01-14 1:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-11 5:43 [emacs-w3m:09920] detect-coding-with-priority Katsumi Yamaoka
2008-01-11 8:00 ` Stephen Berman
2008-01-11 9:59 ` detect-coding-with-priority Kenichi Handa
2008-01-11 11:30 ` detect-coding-with-priority Kenichi Handa
2008-01-11 11:50 ` [emacs-w3m:09929] detect-coding-with-priority Katsumi Yamaoka
2008-01-14 1:01 ` detect-coding-with-priority Kenichi Handa
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).