[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: change input coding
From: |
Sébastien Kirche |
Subject: |
Re: change input coding |
Date: |
Mon, 11 Apr 2005 14:34:22 +0200 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (darwin) |
Le 11 Apr 2005, Peter Dyballa a dit :
> There are (at least) two ways:
>
> 1. Create an empty file (b) containing only
>
> <!-- -*- mode: Text; coding: utf-16-be; -*- -->
>
> and cat the original file (a) into that (cat a >> b).
>
> 2. Temporarily set:
>
> (setq default-buffer-file-coding-system 'utf-16-be)
> (set-default-coding-systems 'utf-16-be)
> (prefer-coding-system 'utf-16-be)
>
> (Copy into *scratch* buffer, mark region, eval-region.)
What about changing the coding system just before opening the file ?
C-x RET c utf-16-be RET C-x C-f <the file>
It would change the coding system locally to the opened file rather than
changing it globally for the emacs session.
Then the OP could just add the first line as you described in 1) for the
next time he will open it.
--
Sébastien Kirche