[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: po file charset via auto-coding-functions
From: |
Kevin Ryde |
Subject: |
Re: po file charset via auto-coding-functions |
Date: |
Sat, 22 Oct 2005 07:07:55 +1000 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) |
"Richard M. Stallman" <address@hidden> writes:
>
> I think it ALWAYS happens. Every call to Finsert_file_contents will
> try to determine the coding system from the first 1k and last 3k of
> the file. (Unless it already knows the coding system to use.)
I tried this (in my build of the cvs starting from -q -no-site-file),
(debug-on-entry 'sgml-html-meta-auto-coding-function)
(find-file "etc/NEWS") ;; the emacs NEWS file
and got
Debugger entered--entering a function:
* sgml-html-meta-auto-coding-function(580713)
byte-code("\212eb\210^H\211A^P@ !)\207" [funcs size] 2)
find-auto-coding("/down/emacs/etc/NEWS" 580713)
set-auto-coding("/down/emacs/etc/NEWS" 580713)
insert-file-contents("/down/emacs/etc/NEWS" t)
ie. the size presented to the func (in just one call to it) is the
full 580kbytes (and the current-buffer has the full file contents).
So, like I say, I was unsure when this does or doesn't happen.
> To make it work reliably, therefore, I think the
> Vset_auto_coding_function function has to look at more of the file.
> If it is looking at a po file, it should do that.
Looking at more than 1k of the file will also be wanted for Project
Gutenberg texts. They have about a ~1k blurb at the start before the
header information that has the coding system spec.
- Re: po file charset via auto-coding-functions, (continued)
- Re: po file charset via auto-coding-functions, Kevin Ryde, 2005/10/22
- Re: po file charset via auto-coding-functions, Kenichi Handa, 2005/10/23
- Re: po file charset via auto-coding-functions, Kevin Ryde, 2005/10/23
- Re: po file charset via auto-coding-functions, Kenichi Handa, 2005/10/24
- Re: po file charset via auto-coding-functions, Stefan Monnier, 2005/10/24
- Re: po file charset via auto-coding-functions, Kenichi Handa, 2005/10/24
- Re: po file charset via auto-coding-functions, Juri Linkov, 2005/10/24
- Re: po file charset via auto-coding-functions, Kenichi Handa, 2005/10/25
- Re: po file charset via auto-coding-functions, Richard M. Stallman, 2005/10/25
Re: po file charset via auto-coding-functions, Richard M. Stallman, 2005/10/21
- Re: po file charset via auto-coding-functions,
Kevin Ryde <=