Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 May 2011 07:00:46 -0500 (CDT)
From:      Robert Bonomi <bonomi@mail.r-bonomi.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Filename containing French Characters
Message-ID:  <201105241200.p4OC0kDp038112@mail.r-bonomi.com>
In-Reply-To: <4DDB6C12.90609@esiee.fr>

next in thread | previous in thread | raw e-mail | index | archive | help

> Date: Tue, 24 May 2011 10:28:02 +0200
> From: Frank Bonnet <f.bonnet@esiee.fr>
> 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<f.bonnet@esiee.fr> 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.  <grin>
>
> 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:
       <http://{{server}}/cv/ESIEE_MANAGEMENT/Systeme_information/11_EM2_SI_JUIN_CV_AMICHIA_Anthony%20Aim%E9e%20Marthe%20Moteh.docx>;

  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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105241200.p4OC0kDp038112>