From owner-freebsd-questions@FreeBSD.ORG Sun Mar 14 00:16:48 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4D8F106566C for ; Sun, 14 Mar 2010 00:16:48 +0000 (UTC) (envelope-from mailnull@mips.inka.de) Received: from mail-in-17.arcor-online.net (mail-in-17.arcor-online.net [151.189.21.57]) by mx1.freebsd.org (Postfix) with ESMTP id 6B1C78FC0A for ; Sun, 14 Mar 2010 00:16:48 +0000 (UTC) Received: from mail-in-19-z2.arcor-online.net (mail-in-19-z2.arcor-online.net [151.189.8.36]) by mx.arcor.de (Postfix) with ESMTP id D9F4A3B2540 for ; Sun, 14 Mar 2010 01:16:46 +0100 (CET) Received: from mail-in-10.arcor-online.net (mail-in-10.arcor-online.net [151.189.21.50]) by mail-in-19-z2.arcor-online.net (Postfix) with ESMTP id E04616BDA0 for ; Sun, 14 Mar 2010 01:16:46 +0100 (CET) Received: from lorvorc.mips.inka.de (dslb-094-217-104-252.pools.arcor-ip.net [94.217.104.252]) by mail-in-10.arcor-online.net (Postfix) with ESMTPS id 7319D28ECB6 for ; Sun, 14 Mar 2010 01:16:46 +0100 (CET) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-10.arcor-online.net 7319D28ECB6 Received: from lorvorc.mips.inka.de (localhost [127.0.0.1]) by lorvorc.mips.inka.de (8.14.4/8.14.3) with ESMTP id o2E0GjVq026157 for ; Sun, 14 Mar 2010 01:16:45 +0100 (CET) (envelope-from mailnull@lorvorc.mips.inka.de) Received: (from mailnull@localhost) by lorvorc.mips.inka.de (8.14.4/8.14.4/Submit) id o2E0GjYf026156 for freebsd-questions@freebsd.org; Sun, 14 Mar 2010 01:16:45 +0100 (CET) (envelope-from mailnull) From: naddy@mips.inka.de (Christian Weisgerber) Date: Sun, 14 Mar 2010 00:16:45 +0000 (UTC) Message-ID: Originator: naddy@mips.inka.de (Christian Weisgerber) To: freebsd-questions@freebsd.org Subject: Compose key and xterm vs. UTF-8 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Mar 2010 00:16:49 -0000 Short: ------ Why do compose key sequences fail to work in a UTF-8 xterm? Long: ----- I have configured a compose key (aka "Multi_key") here: $ setxkbmap -layout us -option compose:ralt When I start an xterm with an ISO8859-1 locale $ LC_CTYPE=en_US.ISO8859-1 xterm & I can use the compose key to enter the expected set of characters with diacritics. (a e i o u with acute accent, grave accent, etc.) So far, so good. When I start an xterm with an ISO8859-2 locale $ LC_CTYPE=pl_PL.ISO8859-2 xterm & xterm will accept compose sequences for 8859-2 characters such as r with acute, l with stoke, etc., but display a different character as if 8859-2 codes are mistaken for 8859-1. Hmm. Buuut... I see in the man page that I need to tell xterm to use the locale settings: $ LC_CTYPE=pl_PL.ISO8859-2 xterm -lc & This works as expected, I can enter 8859-2 characters with compose sequences. (And I can set the XTerm*locale resource to make this the default behavior.) Now, when I start an xterm with a UTF-8 locale $ LC_CTYPE=en_US.UTF-8 xterm -lc & xterm fails to accept compose sequences for common characters from 8859-1/2. At first I thought none would work at all, but some experimenting revealed a very few, such as --- for some sort of dash and L- for a pound sign. No common letters with diacritics, though. The language part of the locale setting doesn't matter; en_US, de_DE, pl_PL, no difference. This is disappointing. You would expect a superset of the common 8859-x characters to be available with UTF-8. Can anybody shed some light on what's going on there? -- Christian "naddy" Weisgerber naddy@mips.inka.de