From owner-freebsd-questions@FreeBSD.ORG Mon May 23 15:46:02 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 5954E1065676 for ; Mon, 23 May 2011 15:46:02 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id 1D67B8FC1C for ; Mon, 23 May 2011 15:46:01 +0000 (UTC) Received: from r55.edvax.de (port-92-195-63-204.dynamic.qsc.de [92.195.63.204]) by mx02.qsc.de (Postfix) with ESMTP id 2AF861E194; Mon, 23 May 2011 17:46:01 +0200 (CEST) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id p4NFk0MG001710; Mon, 23 May 2011 17:46:00 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Mon, 23 May 2011 17:46:00 +0200 From: Polytropon To: Frank Bonnet Message-Id: <20110523174600.b6fd845e.freebsd@edvax.de> In-Reply-To: <4DD9E894.3010701@esiee.fr> References: <990E8670-2137-4F80-8D9D-BCEB05C6ECAA@esiee.fr> <20110522113151.5dd368c7@napoleon> <4DD9E894.3010701@esiee.fr> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Filename containing French characters ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 15:46:02 -0000 On Mon, 23 May 2011 06:54:44 +0200, Frank Bonnet wrote: > when I type the "ls -l" command the file is displayed > with a "?" in place of the French (accentuated ) character That's typical for console operations (text mode) when UTF-coded characters are encountered. The text mode console does not support UTF-8 and does display "?" whenever it encounters a nonprintable character. > I tried UTF8 or iso8859-1 as MM-CHARSET and fr_FR.ISO8859-1 as LANG > global variables but it still don-t work Depending on what actual file system the file is located, you may need to define a "translation" mode (e. g. -C or -W in combination with mount_ntfs). You also have to make sure that if you change language settings, your console has to support it. As a german user, I can use german Umlauts and Eszett with the text mode console as I don't use UTF nonsense for that. For example, I have ttyv0 "/usr/libexec/getty Pc" cons25l1 on secure up to ttyv7 "/usr/libexec/getty Pc" cons25l1 on secure in /etc/ttys. For language settings, please see that FreeBSD does, next to $LANG, also use $LC_* variables. To use language-specific characters when running programs (less, mcedit, vi, anything that inputs or outputs file data), the following settings are made in /etc/csh.cshrc (my default shell, system-wide settings): 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 This makes program messages being in English (preferred), but sets some conventions specific to Germany. I'm sure you can do something similar with the correct language settings and pages for French. It also works with Unicode when using programs that are capable of employing UTF-8 with "setenv LANG de_DE.UTF-8". In this case, even chinese characters can be used, given the proper fonts. Still, I may emphasize that it's NOT good to have non-ASCII characters in file names. Things like spaces, quotes, backslashes, et, curly braces and other special characters _are_ possible in file names, but they do not belong there. On the systems I had to maintain, I adviced my children... erm... users! :-) to only use lowercase letters and _ instead of space, combined with a corporate-given naming convention for work files that had to be managed by the users. A solution (that does solve the problem, not its cause) would be to install the Midnight Commander and use it in a UTF-8 capable terminal in X (but also works in text mode), move the cursor to a file and press PF6 (rename), then enter a name in ASCII. Using this approach, you don't have to enter the original file name ????????.???. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...