From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YOUNG Newsgroups: gmane.emacs.help Subject: Convert UTF-8 Date: Tue, 16 Dec 2008 17:05:14 -0800 (PST) Organization: http://groups.google.com Message-ID: <34c3af09-10d9-4b86-9683-08b37ccd4237@b41g2000pra.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1229494998 31329 80.91.229.12 (17 Dec 2008 06:23:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 17 Dec 2008 06:23:18 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 17 07:24:25 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LCppW-0007AO-EI for geh-help-gnu-emacs@m.gmane.org; Wed, 17 Dec 2008 07:24:22 +0100 Original-Received: from localhost ([127.0.0.1]:50670 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LCpoK-00057A-A4 for geh-help-gnu-emacs@m.gmane.org; Wed, 17 Dec 2008 01:23:08 -0500 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!b41g2000pra.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 97 Original-NNTP-Posting-Host: 64.72.239.75 Original-X-Trace: posting.google.com 1229475915 16940 127.0.0.1 (17 Dec 2008 01:05:15 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 17 Dec 2008 01:05:15 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: b41g2000pra.googlegroups.com; posting-host=64.72.239.75; posting-account=1n6WnAoAAACbXH3nD5I7RQWqdkbTxZki User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.36 Safari/525.19, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:165380 X-Mailman-Approved-At: Wed, 17 Dec 2008 01:16:34 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:60715 Archived-At: 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. 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?