From owner-freebsd-questions@FreeBSD.ORG Tue May 24 12:00:51 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 9ECA01065691 for ; Tue, 24 May 2011 12:00:51 +0000 (UTC) (envelope-from bonomi@mail.r-bonomi.com) Received: from mail.r-bonomi.com (mx-out.r-bonomi.com [204.87.227.120]) by mx1.freebsd.org (Postfix) with ESMTP id 573B78FC1F for ; Tue, 24 May 2011 12:00:51 +0000 (UTC) Received: (from bonomi@localhost) by mail.r-bonomi.com (8.14.4/rdb1) id p4OC0kDp038112 for freebsd-questions@freebsd.org; Tue, 24 May 2011 07:00:46 -0500 (CDT) Date: Tue, 24 May 2011 07:00:46 -0500 (CDT) From: Robert Bonomi Message-Id: <201105241200.p4OC0kDp038112@mail.r-bonomi.com> To: freebsd-questions@freebsd.org In-Reply-To: <4DDB6C12.90609@esiee.fr> 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 12:00:51 -0000 > Date: Tue, 24 May 2011 10:28:02 +0200 > From: Frank Bonnet > Subject: Re: Filename containing French characters ? > > On 05/24/2011 10:01 AM, Robert Bonomi wrote: > >> From owner-freebsd-questions@freebsd.org Tue May 24 02:32:36 2011 > >> Date: Tue, 24 May 2011 09:32:20 +0200 From: Frank > >> Bonnet To: freebsd-questions@freebsd.org Subject: > >> Re: Filename containing French characters ? > >> > >> OK now the filenames are well displayed in the console > >> \BUT ... > >> > >> It still does not work with apache ( 404 file not found ! ) > >> > >> here is the log of apache when trying to access a filename that > >> contains those bloody characters > >> > >> 82.238.8.126 - - [24/May/2011:06:56:01 +0200] "GET > >> /cv/ESIEE_MANAGEMENT/Systeme_information/11_EM2_SI_JUIN_CV_AMICHIA_Ant= > hony > >> %20Aim%C3%A9e%20Marthe%20Moteh.docx HTTP/1.1" 404 1337 > >> > >> The problem comes from the %C3%A9e character ( e eacute ) Not surprising, there is _no_ "%C3%A9e" character in the file name. > > ls -lb in the directory give that : > > -rw-r--r-- 1 www-data www-data 18294 24 mai 03:00 > 11_EM2_SI_JUIN_CV_AMICHIA_Anthony Aim\351e Marthe Moteh.docx > > but wildcards fails .... Ah so. There is an 'unfortunate' line-break in the ls output you show. This may be *VERY* significant. IF what is shown above _is_ *exactly* how the output appears, then there is a '[NL]' as the first character of the filename. In _that_ case, putting a '?' or '*' on the front of the wildcard string _should_ expand to the actual file nam. That is, "ls -lb ?11_EM2*" should succeed. OTOH, *IF* the ls -lb output appears as one long line, please check the output _carefully_, and report _how_many_spaces_ between the last digit of the timestamp, and the fist 'visible' character of the file name. Check that count against a file name that you _can_ wild-card. (I've got a nasty suspicion that there is a _space_ or other 'non-printing' character as the first character of the filename.) *IF* "none of the above" applies, then (and ONLY then) the following applies: 1) try fetching the URL: 2) NOTE: filename 'globbing' (what you call 'wildcards') failing to match that filename *is* a genuine "bug" as regards whatever shell you are using, and you SHOULD file a formal bug report (aka "PR") on that issue. 3) For completeness, try the 'ls -lb 11*' command, while in the data directory, under 'sh', 'tcsh', 'ksh', 'zsh', =and= 'bash'. file a bug report for every shell where the wildcard expansion fails. For the bug report, Include the output generated by script(1), showing the 'ls -lb' of the entire directory, _and_ the attempt to use a wildcard match. Do _NOT_ edit that script log file in any way. the ideal sequence is: 1) invoke script(1). 2) invoke the shell being tested. 3) cd(1) to the relevant directory 4) execute 'ls -lb' 5) execute 'ls -lb 11*" 6) exit the shell under test. 7) exit scriot(1) 8) save the 'typescript' file under an appropriate name. repeat for each shell tested.