[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: po file charset via auto-coding-functions
From: |
Richard M. Stallman |
Subject: |
Re: po file charset via auto-coding-functions |
Date: |
Fri, 21 Oct 2005 00:49:46 -0400 |
One possible problem is that po files can have more than 1024 bytes of
comments before the header info block. I see fileio.c
Finsert_file_contents only grabs 1024 bytes before calling
set-auto-coding, but I can't tell if/when that happens.
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 think a
normal visit or an `archive-extract' has the whole file, so they work.
If Finsert_file_contents can't determine the coding system from that
part of the file, then if it is a normal visit (or if the buffer was
previously empty), it will try again after reading all the file. So I
guess this will work ok in that case.
But if it is inserting the file into a buffer that had other text in
it, or if it is inserting just part of the file, I think it won't
work.
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.
This should not be too hard, since it gets the file name as an argument.
- Re: po file charset via auto-coding-functions, (continued)
- Re: po file charset via auto-coding-functions, Richard M. Stallman, 2005/10/25
- 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 <=