Re: normalizing filenames and strings



On Wed, 2007-03-28 at 11:50 -0500, Shaun McCance wrote:
> On Wed, 2007-03-28 at 16:55 +0200, Xavier Bestel wrote:
> Most applications that operate on files will accept file name
> arguments when invoked.  What are we supposed to do with these?
> Bear in mind that the argument isn't only used by shell junkies.
> It's also used when, for example, you double-click a JPG to open
> EOG.  Nautilus passes the file name to EOG.
> 
> If we don't normalize, users might have a hard time opening
> files from the command line.

Filenames on disk can *never* *ever* be changed. They are byte strings
and must be treated as such, otherwise you can't open or operate on the
file they reference.

However, when creating a *new* file, given a utf8 string as filename, we
can normalize it before creating the file.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a globe-trotting moralistic grifter on the run. She's a tortured 
kleptomaniac soap star with her own daytime radio talk show. They fight crime! 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]