Re: normalizing filenames and strings

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.

Denis Moyogo Jacquerye

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