From owner-freebsd-questions@FreeBSD.ORG Thu Apr 24 17:48:58 2014 Return-Path: Delivered-To: FreeBSD-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CFA68EB for ; Thu, 24 Apr 2014 17:48:58 +0000 (UTC) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E96118EF for ; Thu, 24 Apr 2014 17:48:58 +0000 (UTC) Received: from r56.edvax.de (port-92-195-108-40.dynamic.qsc.de [92.195.108.40]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id 03B0C250CA; Thu, 24 Apr 2014 19:48:49 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id s3OHleEY002035; Thu, 24 Apr 2014 19:47:40 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Thu, 24 Apr 2014 19:47:40 +0200 From: Polytropon To: Ewald Jenisch Subject: Re: FreeBSD10 - changes with "Umlauts"? Message-Id: <20140424194740.4882d72f.freebsd@edvax.de> In-Reply-To: <20140424143858.GA10640@aurora.oekb.co.at> References: <20140424143858.GA10640@aurora.oekb.co.at> Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: FreeBSD-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Apr 2014 17:48:59 -0000 On Thu, 24 Apr 2014 16:38:58 +0200, Ewald Jenisch wrote: > Hi, > > After setting up a new system (FreeBSD10) I'm trying to get "Umlauts" > to display correctly both on the console and under X11, including > X11-clients. I have successfully done that recently (FreeBSD 10 system installed on a laptop). > Over various FreeBSD releases I worked with the following configuration: > > /etc/ttys: > console none cons25l1 off secure > ttyv0 "/usr/libexec/getty Pc" cons25l1 on secure > ... This is correct. The default settings have now been changed to "xterm". However, for console work, setting "cons25l1" is still possible. > In order to get the correct locale settings for users they have a > setting like this in their > > ~/.bash_profile: > export LC_CTYPE=de_AT.ISO8859-15 Other options are de_AT.ISO8859-1 (the traditional setting, does not include Euro currency sign which doesn't work on the console display anyway) or de_AT.UTF-8 (which is usually seen as today's standard). You need to experiment in which combination those work with "xterm" or "cons25l1" for console display. In X, there shouldn't be any problems as terminal emulators set "xterm", and X applications do their own thing. :-) > Just for completeness, here's what I got in > > /etc/rc.conf: > keymap="german.iso.acc.kbd" It's also possible to set keymap="german.iso" but don't forget to define the proper fonts: font8x14="iso-8x14" font8x16="iso-8x16" font8x8="iso-8x8" Those contain Umlauts and Eszett. > Status: > 1) Umlauts *don't* work on the console To be expected. The default font doesn't have them. > 2) Umlauts work under X11 and clients (emacs, firefox,...) To be expected. Those programs do not rely on the settings discussed so far. > 3) When accessing the box via ssh from "putty" with "UTF-8" set in > putty: > small caps umlauts work > caps umlauts don't work Strange, but as soon as there's an "external terminal" involved, things get more complicated. I'm usually using the system's ssh client (instead of PuTTY) and found that it works when remotely accessing a FreeBSD 10 system from a FreeBSD 8 system (9 and 10 should also work). But again, make sure that the font on the _remote_ display is set correctly so you can see the characters received by the SSH client. > I've also experimented with setting "LC_CTYPE=de_AT.UTF-8" but that > only made matters worse Welcome to the modern times of UTF-8. :-) > So here are my questions: > > o) Has anything changed wrt umlaut characters from FreeBSD9 to FreeBSD10? Not that I've noticed, except you need to change some defaults and add some settings as described. > o) Shouldn't setting "UTF-8" work with umlauts in all cases? No. Basically, UTF-8 introduces "other umlauts", which means instead of 1 byte, now 2 bytes are needed to encode an Umlaut. This is for the representation of such a letter in a file. Regarding the display, UTF-8 _should_ work if the font used for displaying characters does have the correct symbols in the expected places. If not, a "different representation" (for example as hex codes or question marks) will be taken. Within X, no problems should exist. > o) Any ideas on how to get umlaut characters to work in every case, i.e. > -) console > -) X11 > -) putty session (ssh) See examples above. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...