emacs and ASCII file to ISO-8859-* to UTF-8



On Tue, Nov 14, 2006 at 09:31:25AM +0100, Matus UHLAR - fantomas wrote:
On 12.11.06 14:52, Andrea Ganduglia wrote:
Hi. I have a lots ascii file with ecoding iso-8859-* and I must
convert those in UTF-8. How?

On Mon, Nov 13, 2006 at 10:06:44AM +0100, Matus UHLAR - fantomas wrote:
iconv -f <src-encoding> -t <dst-encoding> <inputfile> > outputfile.

There is also 'recode' package, however I found it a bit redundant, since
iconv (part of libc6) has this functionality

On 13.11.06 09:14, hendrik@xxxxxxxxxxxxxx wrote:
And after you've has converted such a file, how can you tell emacs that
it is supposed to recognise the new encoding?

pardon?

This is an emacs-specific add-on question. If it has seen a file in one
encoding system, and I run a program to change it to another (in my
case, getting my accented letters converted from the old 8-bit encoding
into UTF-8) emacs insists on continuing to read it as if it were in the
old encoding, so my accented characters, which have been expanded into
two bytes each, show up in the editor as two gibberish characters each.
It seems that emacs keeps a database somewhere of file names and
encodings. In theory that would be useful, I guess, because there isn't
another mechanism in the filesysten to mark files with their encodings,
but if such a convention isn't a system-wide convention, tools don't
know about it and it doesn't work. I'm tryin to run a clean UTF-8
system, and I want my non-UTF-8 abberations to be converted and treated
as UTF-8 henceforth, instead of converting them and having them treated
as non-UTF-8.

-- hendrik


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: automating the SQL warning and the choice of text format
    ... automatically select 'yes' and 'utf-8' rather than changing the registry, ... In order to get the correct encoding, I believe that you have to do the ... You need one of those for each data source. ... For a comma-delimited file using UTF-8 encoding, ...
    (microsoft.public.word.mailmerge.fields)
  • tclhttpd with utf-8
    ... I have my half yearly encoding nightmare. ... we are now converting our work to utf-8. ... is returned from the direct url method I need to ...
    (comp.lang.tcl)
  • Re: PEP 263 status check
    ... > chosing windows-1252 as the source encoding. ... in the string module, the string methods and all through ... encoded data (including utf-8 encodings) ... character that is outside of the 7-bit ascii subset. ...
    (comp.lang.python)
  • Re: PEP 263 status check
    ... > dealing with the case where the encoding declaration ... > specifically says that the script is in UTF-8. ... chosing windows-1252 as the source encoding. ... UTF-8 as a source encoding. ...
    (comp.lang.python)
  • Re: convert from utf-8 to unicode(excel)
    ... Is there a possibility to properly convert under Windows from utf-8 ... encoding to unicode ... There is no problem in conversion when I do it in Notepad. ... a file marking encoding as UTF-8 and then save it marking encoding as ...
    (comp.editors)