From owner-freebsd-questions@FreeBSD.ORG Tue Nov 6 01:42:17 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D2BFD8F8 for ; Tue, 6 Nov 2012 01:42:17 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id 786288FC08 for ; Tue, 6 Nov 2012 01:42:17 +0000 (UTC) Received: from r56.edvax.de (port-92-195-8-72.dynamic.qsc.de [92.195.8.72]) by mx01.qsc.de (Postfix) with ESMTP id 60CC53CD8C; Tue, 6 Nov 2012 02:42:16 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id qA61gGw1004235; Tue, 6 Nov 2012 02:42:16 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Tue, 6 Nov 2012 02:42:16 +0100 From: Polytropon To: Joseph a Nagy Jr Subject: Re: Xiphos Locale Bug? Message-Id: <20121106024216.68ca22e3.freebsd@edvax.de> In-Reply-To: <50986722.7020102@gmail.com> References: <50985FD3.60107@gmail.com> <20121106021927.3f9a4cb2.freebsd@edvax.de> <50986722.7020102@gmail.com> 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 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Nov 2012 01:42:18 -0000 On Mon, 05 Nov 2012 19:25:54 -0600, Joseph a Nagy Jr wrote: > On 11/05/12 19:19, Polytropon wrote: > > On Mon, 05 Nov 2012 18:54:43 -0600, Joseph a Nagy Jr wrote: > >> FreeBSD 9.0-RELEASE, i386 > >> > >> Xiphos is giving me a strange warning[0], and I'm not quite sure what to > >> make of it. > > > > Currently "C" is set as the default language setting (locale) > > for that specific program. It cannot handle it and probably > > won't (as indicated) translate things properly. "C" is the > > typical fallback locale. > > Really? Seems a bit odd. No, it's just the most "simple" setting. :-) It is what e. g. functions listed in "man 3 ctype" will refer to. > > See the settings of $LANG and the $LC_* variables. There is > > a specific precedence in their evaluation! > > Ah, I will have to read up on those, for future reference. >From "man csh": When using the system's NLS, the setlocale(3) function is called to determine appropriate character code/classification and sorting (e.g., a 'en_CA.UTF-8' would yield "UTF-8" as a character code). This func- tion typically examines the LANG and LC_CTYPE environment variables; refer to the system documentation for further details. When not using the system's NLS, the shell simulates it by assuming that the ISO 8859-1 character set is used whenever either of the LANG and LC_CTYPE variables are set, regardless of their values. Sorting is not affected for the simulated NLS. You can find the meaning of the $LC_* variables in "man 3 setlocale" for reference. They allow a fine grained specification of what should be dealt with "in which language", while $LANG is easier to use for "one size fits all" requirements. > >> Should I just re-compile now that I've explicitly set things? > > > > Why? Language settings are evaluated at runtime, no need to > > compile anything. As you have made the change to login.conf > > (at the global level), make sure your user account doesn't > > override anything. Also check if you need to run cap_mkdb > > to create login.conf.db from your settings. > > I already ran it, I just need to logout/in after LibreOffice is done > compiling. You can temporarily call a program with a different setting to see what language it "runs" in: $ LC_ALL=de_DE.ISO8859-1 /usr/local/bin/mc $ LC_ALL=pl_PL.ISO8859-2 /usr/local/bin/mc $ LC_ALL=en_US.ISO8859-1 /usr/local/bin/mc This will of course only work for _that_ specific program call and will not persist. Using UTF-8 instead of one of the ISO encodings could lead to "screen & character garbage". :-) > > Alternatively (usually not recommended, but works) you can > > set (i. e. setenv) language variables in /etc/csh.cshrc > > globally, or ~/.cshrc for your user account. > > > > Example: > > > > setenv LC_ALL en_US.ISO8859-1 > > setenv LC_MESSAGES en_US.ISO8859-1 > > setenv LC_COLLATE de_DE.ISO8859-1 > > setenv LC_CTYPE de_DE.ISO8859-1 > > setenv LC_MONETARY de_DE.ISO8859-1 > > setenv LC_NUMERIC de_DE.ISO8859-1 > > setenv LC_TIME de_DE.ISO8859-1 > > unsetenv LANG > > > > That will leave english text intact (most usable language > > setting for most programs), but allow specific settings like > > time notation or collation according to the german rules. > > Will keep that in mind for future reference. I'm going to be learning > one or two new languages soon and that will be helpful when I go to set > up a new user to practice reading (and not just talking) those languages. (: I went with the above approach to have all my programs "talk" in english because they are easier to understand than the only partially done and sloppy german translations. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...