From owner-freebsd-questions@FreeBSD.ORG Tue May 24 17:53:15 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 E977E106564A for ; Tue, 24 May 2011 17:53:15 +0000 (UTC) (envelope-from cpghost@cordula.ws) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id AEE118FC15 for ; Tue, 24 May 2011 17:53:15 +0000 (UTC) Received: by vxc34 with SMTP id 34so7060541vxc.13 for ; Tue, 24 May 2011 10:53:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.215.65 with SMTP id hd1mr1094241vcb.44.1306259594782; Tue, 24 May 2011 10:53:14 -0700 (PDT) Received: by 10.220.5.11 with HTTP; Tue, 24 May 2011 10:53:14 -0700 (PDT) X-Originating-IP: [93.221.176.1] In-Reply-To: References: <990E8670-2137-4F80-8D9D-BCEB05C6ECAA@esiee.fr> Date: Tue, 24 May 2011 19:53:14 +0200 Message-ID: From: "C. P. Ghost" To: Modulok Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Frank Bonnet , freebsd-questions@freebsd.org Subject: Re: Filename containing French 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: Tue, 24 May 2011 17:53:16 -0000 On Mon, May 23, 2011 at 5:50 PM, Modulok wrote: > Short answer, use a glob pattern. Assume I have a file named '=E0 fichier= .txt': (...) Very good hints indeed. I once had a directory full of files with strange characters, so I wrote a little program that replaced every non-ascii char in a filename with its hex-encoding (like this: "Hello%20World%21", % escape char), so I could manipulate them with the shell. As long as the expanded filenames didn't hit the MAXNAMELEN limit in , it worked perfectly. I could dig this C program out of old archives, but I guess that it is faster to rewrite it on the fly, or even script it with sh(1), tr(1), awk(1= ), and find(1)... ;-) Alternatively to such a run-once-in-a-while program, I could also imagine a file system layer on top of existing file systems that would do this conversion automatically, but that's harder to code, and harder to debug (kernel mode!). -cpghost. --=20 Cordula's Web. http://www.cordula.ws/