From owner-freebsd-questions@FreeBSD.ORG Wed Nov 9 02:09:33 2011 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 409F3106566B for ; Wed, 9 Nov 2011 02:09:33 +0000 (UTC) (envelope-from conrads@cox.net) Received: from eastrmfepo101.cox.net (eastrmfepo101.cox.net [68.230.241.213]) by mx1.freebsd.org (Postfix) with ESMTP id D0B798FC15 for ; Wed, 9 Nov 2011 02:09:32 +0000 (UTC) Received: from eastrmimpo305.cox.net ([68.230.241.237]) by eastrmfepo101.cox.net (InterMail vM.8.01.04.00 201-2260-137-20101110) with ESMTP id <20111109020926.QNI3808.eastrmfepo101.cox.net@eastrmimpo305.cox.net>; Tue, 8 Nov 2011 21:09:26 -0500 Received: from serene.no-ip.org ([98.164.86.236]) by eastrmimpo305.cox.net with bizsmtp id uq9R1h00M55wwzE02q9RoQ; Tue, 08 Nov 2011 21:09:26 -0500 X-CT-Class: Clean X-CT-Score: 0.00 X-CT-RefID: str=0001.0A020204.4EB9E0D6.003B,ss=1,re=0.000,fgs=0 X-CT-Spam: 0 X-Authority-Analysis: v=1.1 cv=BX0YEIBOusRIeQdDschwVvWAB1OmeRFmMWKQyT+Am3A= c=1 sm=1 a=G8Uczd0VNMoA:10 a=kj9zAlcOel0A:10 a=uAbGmPAyUfLL1M3oYAsfuA==:17 a=lM4-zUH5AAAA:8 a=kviXuzpPAAAA:8 a=OKyewbe6qOwsheSDvTwA:9 a=AFn1YTVENLhFpt87nzAA:7 a=CjuIK1q_8ugA:10 a=4vB-4DCPJfMA:10 a=uAbGmPAyUfLL1M3oYAsfuA==:117 X-CM-Score: 0.00 Authentication-Results: cox.net; none Received: from cox.net (localhost [127.0.0.1]) by serene.no-ip.org (8.14.5/8.14.5) with ESMTP id pA929PcE016273; Tue, 8 Nov 2011 20:09:25 -0600 (CST) (envelope-from conrads@cox.net) Date: Tue, 8 Nov 2011 20:09:20 -0600 From: "Conrad J. Sabatier" To: Robert Bonomi Message-ID: <20111108200920.2724a742@cox.net> In-Reply-To: <201111090117.pA91HRDo065662@mail.r-bonomi.com> References: <20111108184236.3a78ebf6@cox.net> <201111090117.pA91HRDo065662@mail.r-bonomi.com> X-Mailer: Claws Mail 3.7.10 (GTK+ 2.24.6; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: "Unprintable" 8-bit characters 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: Wed, 09 Nov 2011 02:09:33 -0000 On Tue, 8 Nov 2011 19:17:27 -0600 (CST) Robert Bonomi wrote: > > On Tue, 8 Nov 2011 18:42:36 -0600, "Conrad J. Sabatier" wrote: > > > > I've been trying to understand what the deal is with regards to the > > displaying of the "extended" 8-bit character set, i.e., 8-bit > > characters with the MSB set. > > Quite simply Unix dates from the days where the 8th bit was used as a > 'parity' bit. Allowing detection of *all* single-bit errors -- > especially over the notoriously un-reliable connections known as > 'serial ports'. > > > > More specifically, I'm trying to figure out how to get the "ls" > > command to properly display filenames containing characters in this > > extended set. I have some MP3 files, for instance, whose names > > contain certain European characters, such as the lowercase "u" with > > umlaut (code 0xfc in the Latin set, according to gucharmap), that I > > just can't get ls to display properly. These characters seem to be > > considered by ls as "unprintable", and the best I've been able to > > produce in the ls output is backslash interpretations of the > > characters using either the -B or -b options, otherwise the default > > "?" is displayed in their place. > > > > The strange thing is that these characters will display just fine in > > xterm, gnome-terminal, etc. I can copy and paste them from the > > gucharmap utility into a shell command line or other application, > > and they appear as they should, but ls simply refuses to display > > them. I can print them using the printf command, even bash's > > builtin echo seems to have no problem with them. Only ls appears > > to have this problem. > > > > I've experimented with using various locales, using the LC_* > > variables, as well as the LANG variable (as documented in the > > environment section of the ls man page), all to no avail. > > Obviously you never read as far as the '-w' switch. Just a quickie followup: Setting LC_ALL=en_US.UTF-8 and using "ls -w" was, in fact, the magic key (at least, in any of the X terminal apps; still getting the little "exponential n" in the console)! Thank you so much. I'll sleep much better tonight. :-) -- Conrad J. Sabatier conrads@cox.net