From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Herbert Schiemann Newsgroups: gmane.emacs.help Subject: utf-8 to standard output? Date: Fri, 25 Feb 2011 09:28:45 +0100 Message-ID: <1298622525.8187.11.camel@lena.herbaer> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1298677495 27760 80.91.229.12 (25 Feb 2011 23:44:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 25 Feb 2011 23:44:55 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Feb 26 00:44:49 2011 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.69) (envelope-from ) id 1Pt7L6-0002qp-Iy for geh-help-gnu-emacs@m.gmane.org; Sat, 26 Feb 2011 00:44:48 +0100 Original-Received: from localhost ([127.0.0.1]:59815 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pt7L5-0003Rr-F3 for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Feb 2011 18:44:47 -0500 Original-Received: from [140.186.70.92] (port=60996 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pst6I-0004l0-Uo for help-gnu-emacs@gnu.org; Fri, 25 Feb 2011 03:32:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pst6H-0003p4-Q3 for help-gnu-emacs@gnu.org; Fri, 25 Feb 2011 03:32:34 -0500 Original-Received: from dd23832.kasserver.com ([85.13.143.97]:46648) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pst6H-0003o4-Kg for help-gnu-emacs@gnu.org; Fri, 25 Feb 2011 03:32:33 -0500 Original-Received: from [10.166.245.31] (unknown [92.116.245.31]) by dd23832.kasserver.com (Postfix) with ESMTPA id DB0A1113E049 for ; Fri, 25 Feb 2011 09:32:27 +0100 (CET) X-Mailer: Evolution 2.22.3.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 85.13.143.97 X-Mailman-Approved-At: Fri, 25 Feb 2011 18:42:26 -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:79479 Archived-At: I have a problem using princ to write utf-8 - encoded text to standard output. I tried this script: #!/usr/bin/emacs --script ;;; umlaut.el --- Kodierung der Ausgabe ;;; Code: (princ "=C3=84\n") (princ (encode-coding-string "=C3=84\n" 'utf-8)) ;; Local Variables: ;; coding:utf-8 ;; End: ;;; umlaut.el ends here and I get herbaer@lena:~$ ./umlaut.el > umlaut Loading 00debian-vars... Loading /etc/emacs/site-start.d/20apel.el (source)... Loading /etc/emacs22/site-start.d/35elib-startup.el (source)... Loading /etc/emacs/site-start.d/50css-mode.el (source)... Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)... Loading debian-ispell... Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)... Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)... Loading /etc/emacs/site-start.d/50gcl.el (source)... Loading /etc/emacs/site-start.d/50html-helper-mode.el (source)... Loading /etc/emacs/site-start.d/55mell.el (source)... Loading /etc/emacs22/site-start.d/60nxml-mode.el (source)... Loading /usr/share/emacs22/site-lisp/nxml-mode/rng-auto.el (source)... herbaer@lena:~$ hexdump -C umlaut 00000000 81 c4 0a c3 9e a4 0a |.......| 00000007 herbaer@lena:~$ emacs --version GNU Emacs 22.2.1 Copyright (C) 2008 Free Software Foundation, Inc. GNU Emacs comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of Emacs under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING. herbaer@lena:~$=20 I want to output the letter "=C3=84" as 0xc3a4. What is going wrong? Thanks, Herbert Schiemann