Re: normalizing filenames and strings

On Wed, 2007-03-28 at 19:43 +0200, Denis Jacquerye wrote:
> On 3/28/07, Alexander Larsson <alexl redhat com> wrote:
> > 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.
> For command line or invoked name, applications could test for the
> requested name; if inexistant, they should attempt with the
> canonically equivalent filenames existing.

No, its never right to guess like this. It can lead to all sorts of
problems, and it is a performance drag. File names are exact
identifiers, not UI strings.

 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's an underprivileged albino rock star with a mysterious suitcase handcuffed 
to his arm. She's a strong-willed Buddhist politician with an MBA from 
Harvard. They fight crime! 

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