From: Andreas Politz <politza@fh-trier.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Convert UTF-8
Date: Wed, 17 Dec 2008 03:27:34 +0100 [thread overview]
Message-ID: <1229480920.448497@arno.fh-trier.de> (raw)
In-Reply-To: <34c3af09-10d9-4b86-9683-08b37ccd4237@b41g2000pra.googlegroups.com>
YOUNG wrote:
> Hi,
>
> I have a Emacs 22.3.1 for Windows XP, and there is a file encoded in
> ASCII. I am trying to read the file and convert it to UTF-8 with
> emacs.
>
If I am not mistaken, converting a ASCII file to UTF-8 is an identity operation,
since the later is backwards compatible to the former. So there would be nothing
to convert.
-ap
> I have tried
>
> M-x set-buffer-file-coding-system
>
> and set up utf-8 and check it has changed to 'u' in status bar, and
> since buffer has changed, it shows '**' as well.
>
> So, I write the file using "C-x s".
>
> It seems to fine. So, I exit the emacs, and rerun the emacs again and
> read the file, too. However, the file is not converted at all.
>
> Here is when I did "describe-current-coding-system"
>
> ----------------------
>
> Coding system for saving this buffer:
> - -- undecided-dos
>
> Default coding system (for new files):
> u -- mule-utf-8 (alias: utf-8)
>
> Coding system for keyboard input:
> * -- cp1252 (alias of windows-1252)
>
> Coding system for terminal output:
> * -- cp1252 (alias of windows-1252)
>
> Defaults for subprocess I/O:
> decoding: u -- mule-utf-8-dos
>
> encoding: u -- mule-utf-8-unix
>
>
> Priority order for recognizing coding systems when reading files:
> 1. mule-utf-8 (alias: utf-8)
> 2. iso-latin-1 (alias: iso-8859-1 latin-1)
> 3. mule-utf-16be-with-signature (alias: utf-16be-with-signature mule-
> utf-16-be utf-16-be)
> 4. mule-utf-16le-with-signature (alias: utf-16le-with-signature mule-
> utf-16-le utf-16-le)
> 5. iso-2022-jp (alias: junet)
> 6. iso-2022-7bit
> 7. iso-2022-7bit-lock (alias: iso-2022-int-1)
> 8. iso-2022-8bit-ss2
> 9. emacs-mule
> 10. raw-text
> 11. japanese-shift-jis (alias: shift_jis sjis cp932)
> 12. chinese-big5 (alias: big5 cn-big5 cp950)
> 13. no-conversion
>
> Other coding systems cannot be distinguished automatically
> from these, and therefore cannot be recognized automatically
> with the present coding system priorities.
>
> The following are decoded correctly but recognized as iso-2022-7bit-
> lock:
> iso-2022-7bit-ss2 iso-2022-7bit-lock-ss2 iso-2022-cn iso-2022-cn-
> ext iso-2022-jp-2 iso-2022-kr
>
> Particular coding systems specified for certain file names:
>
> OPERATION TARGET PATTERN CODING SYSTEM(s)
> --------- -------------- ----------------
> File I/O "\\.dz\\'" (no-conversion . no-conversion)
> "\\.g?z\\(~\\|\\.~[0-9]+~\\)?\\'"
> (no-conversion . no-conversion)
> "\\.tgz\\'" (no-conversion . no-conversion)
> "\\.tbz\\'" (no-conversion . no-conversion)
> "\\.bz2\\(~\\|\\.~[0-9]+~\\)?\\'"
> (no-conversion . no-conversion)
> "\\.Z\\(~\\|\\.~[0-9]+~\\)?\\'"
> (no-conversion . no-conversion)
> "\\.elc\\'" (emacs-mule . emacs-mule)
> "\\.utf\\(-8\\)?\\'" utf-8
> "\\(\\`\\|/\\)loaddefs.el\\'"
> (raw-text . raw-text-unix)
> "\\.tar\\'" (no-conversion . no-conversion)
> "\\.po[tx]?\\'\\|\\.po\\."
> po-find-file-coding-system
> "\\.\\(tex\\|ltx\\|dtx\\|drv\\)\\'"
> latexenc-find-file-coding-system
> "" find-buffer-file-type-coding-system
> Process I/O "[pP][lL][iI][nN][kK]" (undecided-dos . undecided-dos)
> "[cC][mM][dD][pP][rR][oO][xX][yY]"
> (undecided-dos . undecided-dos)
> Network I/O nothing specified
> ----------------------
>
> Do you know how to convert a file to UTF-8 using emacs, please?
>
next prev parent reply other threads:[~2008-12-17 2:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-17 1:05 Convert UTF-8 YOUNG
2008-12-17 2:27 ` Andreas Politz [this message]
2008-12-17 7:54 ` Harald Hanche-Olsen
2008-12-17 8:41 ` YOUNG
2008-12-17 9:59 ` Thierry Volpiatto
2008-12-17 11:17 ` Giorgos Keramidas
2008-12-17 12:04 ` Xah Lee
2008-12-18 8:35 ` YOUNG
2008-12-18 14:56 ` Harald Hanche-Olsen
2008-12-17 10:43 ` Peter Dyballa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1229480920.448497@arno.fh-trier.de \
--to=politza@fh-trier.de \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.