From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29985 invoked from network); 1 Mar 2009 00:12:42 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 1 Mar 2009 00:12:42 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 76376 invoked from network); 1 Mar 2009 00:12:36 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 1 Mar 2009 00:12:36 -0000 Received: (qmail 21479 invoked by alias); 1 Mar 2009 00:12:32 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26649 Received: (qmail 21461 invoked from network); 1 Mar 2009 00:12:31 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 1 Mar 2009 00:12:31 -0000 Received: from mx.spodhuis.org (redoubt.spodhuis.org [193.202.115.177]) by bifrost.dotsrc.org (Postfix) with ESMTPS id 3EC618058F83 for ; Sun, 1 Mar 2009 01:12:28 +0100 (CET) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=d200902; d=spodhuis.org; h=Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:Content-Transfer-Encoding:In-Reply-To; b=TC5iMyj/yUV6HArlHRbLgrhhr7AJCFMiGXe25fyyl2jFPJPMYWO+Lc6wdZtgN+NM2iDJMjEqXU4OTBeqdyqJD4oy8J0ZMneMXsfXYWN4LnDx44xOJODZE8uwiR081W3cS8rWDH+ZL0mdVm0F7lksb+nygzjzfjeoSS2f9CoRak4=; Received: by smtp.spodhuis.org with local id 1LdZIA-000Fs2-AZ; Sun, 01 Mar 2009 00:12:26 +0000 Date: Sat, 28 Feb 2009 16:12:26 -0800 From: Phil Pennock To: zsh-workers@sunsite.dk Subject: Re: Echoing of 8-bit-characters broken after 4.3.2? Message-ID: <20090301001226.GA8891@redoubt.spodhuis.org> Mail-Followup-To: zsh-workers@sunsite.dk References: <2493fbfb0902281400r5d56ef91r74d55433eddf51be@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2493fbfb0902281400r5d56ef91r74d55433eddf51be@mail.gmail.com> X-Virus-Scanned: ClamAV 0.92.1/9057/Sat Feb 28 14:56:20 2009 on bifrost X-Virus-Status: Clean On 2009-02-28 at 23:00 +0100, Wolfgang Hukriede wrote: > Andrey wrote: > > Because this is established standard to define your character set > > properties. Without it applications should assume C (or POSIX) locale > > that basically corresponds to standard ASCII. > > Should the character set properties not be set by LC_CTYPE? As far as > I can tell LANG sets more than that? Do I understand correctly that > LANG is zsh-specific? (On my box, man 3 setlocale does not have it.) LANG is not zsh-specific. LANG sets defaults, the LC_* settings override those and LC_ALL overrides everything, if memory serves. On FreeBSD, running "locale" on its own reports all the relevant variables, including LANG. "locale charmap" is useful to see the current charmap. BTW, are you from Iceland? is_IS means Icelandic, Iceland variant. en_GB and en_US for English are common, and de_DE for German. So I run with en_US.UTF-8 on FreeBSD and LANG= will show you all the options. For LC_CTYPE it doesn't matter so much which language you choose. To test an "unset" variable, set it to the value "C", which is the default and roughly means 7-bit ASCII. So, I just installed luit on my laptop and ssh'd to my private box, which is normally UTF-8, with: luit -encoding iso8859-1 ssh luit is a wrapper which lets you translate foreign character sets back to UTF-8, so you can connect to non-UTF-8 systems from a UTF-8 system. If I set: LC_CTYPE=C and type <-> to see £ (should be POUND SIGN, Sterling, for the British currency) then I get <00a3>. If I set: LC_CTYPE=en_US.ISO8859-15 then I see the "£" as I should. These days, you probably want to use the -15 variant instead of the -1 variant, to get Latin 9, which has a few small changes from Latin 1; most noticeably for many, the international currency symbol is replaced with the EURO SIGN. Except that on the FreeBSD (7.0) system, it doesn't appear to work in ISO8859-15. Strange. I'd never noticed before because I use UTF-8 and frankly I don't care enough to chase down the cause. Regards, -Phil