From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/4855 Path: news.gmane.org!not-for-mail From: Peter Petersen Newsgroups: gmane.emacs.gnus.user Subject: Re: thanks, but new problem: utf-8 on a virtual text console Supersedes: <87r7hnfvjo.fsf@pp.ppetersen-usenet76543.de> Date: Wed, 06 Apr 2005 23:47:39 +0200 Organization: just testing gnus... Message-ID: <87u0mj37d0.fsf@pp.ppetersen-usenet76543.de> References: <42345abc$0$1078$9b4e6d93@newsread2.arcor-online.net> <39l973F60qa11U1@individual.net> <42359857$0$26554$9b4e6d93@newsread4.arcor-online.net> <16949.42079.854993.937945@parhasard.net> <4235b0e4$0$1078$9b4e6d93@newsread2.arcor-online.net> <3a6f5jF652kulU1@individual.net> <423e131d$0$9220$9b4e6d93@newsread4.arcor-online.net> <16958.6448.689501.926619@parhasard.net> <8764z0hq89.fsf_-_@pp.ppetersen-usenet76543.de> <874qekg994.fsf@pp.ppetersen-usenet76543.de> <864qekzc6d.fsf@pallotta.studby.uio.no> <87hdijn06j.fsf_-_@pp.ppetersen-usenet76543.de> <871x9nmzef.fsf@localhost.localdomain> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138670728 25145 80.91.229.2 (31 Jan 2006 01:25:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 01:25:28 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:34:24 2006 Original-Path: quimby.gnus.org!newsfeed1.e.nsc.no!uio.no!npeer.de.kpn-eurorings.net!newsfeed.arcor.de!news.arcor.de!not-for-mail Original-Newsgroups: gnu.emacs.gnus User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) Cancel-Key: sha1:LYTQaC32yWxrGTMiFMKtpi0l170= Cancel-Lock: sha1:erg4McfExn2iBdllElcjve/IBSc= Original-NNTP-Posting-Date: 06 Apr 2005 23:47:35 MEST Original-NNTP-Posting-Host: 3736290e.newsread4.arcor-online.net Original-X-Trace: DXC=C3I3oNZ@O8n?m49DcKk?Rn:ejgIfPPlddjW\KbG]kaMhFYk:AnJB[Cmc9DB]IZZNlaV;Mn3=TQgPiCZS@:\:ML>` Original-X-Complaints-To: abuse@arcor.de Original-Xref: bridgekeeper.physik.uni-ulm.de gnus-emacs-gnus:4996 Original-Lines: 55 X-Gnus-Article-Number: 4996 Tue Jan 17 17:34:24 2006 Xref: news.gmane.org gmane.emacs.gnus.user:4855 Archived-At: * TeXitoi schrieb: > Peter Petersen writes: > >> With my utf-8 settings for using gnus with gnome-terminal, I get a >> complete mess when running emacs or gnus in a virtual text >> console. Somehow I can't get it to use utf-8. If someone knows about a >> way to change this or - alternatively - can tell me how to write an >> entry in .emacs to switch between coding systems if emacs is used on a >> text console in contrast to a terminal under X Window, please let me >> know. > > I supose that your problem is about typing non-ascii charactere. I'd > the problem for typing, but not for display (display depend of your > local). To input, I have that in my .emacs : > > (if (not (eq window-system 'x)) > (cond ((string-match ".UTF-8" (getenv "LANG")) > (set-keyboard-coding-system 'utf-8)) > ((string-match "@euro" (getenv "LANG")) > (set-keyboard-coding-system 'latin-0)) > (t (set-keyboard-coding-system 'latin-1)))) > > you can adapt that to yours needs. Ok thanks, but I don't get any further. And: I am not using "window system" anyway, when running emacs from within a gnome-terminal, right...? Due to my lack of knowledge about these things, I use that ugly command line, called as a bash script, of course: LC_ALL=de_DE.UTF-8@euro gnome-terminal -e "emacs -nw --eval '(xterm-mouse-mode 1)' -f gnus-unplugged "$@"" || emacs -nw --eval "(set-terminal-coding-system 'latin-9)" --eval "(set-keyboard-codin g-system 'latin-9)" --eval '(xterm-mouse-mode 1)' -f gnus-unplugged "$@" Sure, this looks _very_ amateurish. :) But it works sufficiently, which, as you can see, gives me full utf-8 support when running emacs/gnus in a gnome-terminal when in X, while giving me iso-8859-1 support when running emacs/gnus in a virtual text console. By support I mean: support for typing _and_ getting displayed Umlaute, euro signs etc. Naturally, suggestions for improvements, or rather, "professional" and not that dilletantish solutions are always very welcome. ;-) Regards Peter