Re: [Nautilus-list] A fix for non-ASCII characters (and hello)



lör 2002-01-19 klockan 02.04 skrev Christian Rose:
> > So, IMO, while the filename might not have been broken to begin with, it
> > got broken when saved to disk, and an internal configuration name like
> > an environment variable, I think it is fine to reflect that.
> 
> If it's possible to solve in some cases when it's invalid UTF-8 with
> some heuristics applied, I think this should be done. After all, the
> user isn't to blame for faulty software behavior in the past. Grandma
> will be happy to have her old recipes displayed correctly, and her new
> ones will be saved with UTF-8 file names (but she doesn't need to know
> that).

It's almost always possible to guess right. I tested a great number of
texts with different ISO-8859-x charsets, and only one file passed as
UTF-8. This was an english file which contained the sequence "NESTLÉ®",
which would give the U026E (LATIN SMALL LETTER LEZH).

Of course, the smaller the text sample, the greater the risk for error.
Could we introduce G_GUESS_BROKEN_FILENAMES or something to invoke the
guessing algorithm?

This algorithm can be improved more, but I think just treating invalid
UTF-8 as the locale charset would be good enough.

When creating/renaming files, you must decide whether to use the locale
charset or UTF-8. Personally I would like the possibility to choose this
separately for each file I save.

Regards,

	Martin




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