Re: triage: Problem for the up-loading of non-ASCII character file name.

2007-02-11 Thread tsuyuki makoto
07/02/11 Yasushi Masuda<[EMAIL PROTECTED]> wrote: > Instead, I'd like to propose making get_valid_filename() as default > behaviour of ``filename_normalization``, and adding a > ``filename_nomalizer`` parameter in FileField's constructor, like this:: I completely agree with Yasushi. The point is

Re: triage: Problem for the up-loading of non-ASCII character file name.

2007-02-10 Thread Yasushi Masuda
Makoto, Michael, Gabor, Ivan: In the discussion, I'm getting to think that the definition/policy of the "valid filename (for storage)" may vary for circumstances or fields where individual developer concerns, thus it should be hard to provide the ultimate-flawless way for nomalizing filename. Eve

Re: triage: Problem for the up-loading of non-ASCII character file name.

2007-02-07 Thread Ivan Sagalaev
Michael Radziej wrote: > No, I'd propose simply to use the file system's encoding for files > within the file system, that's all, This will fail in some cases. The problem is that file system itself doesn't check (nor enforce) any encoding in file names. And files may come to server from differ

Re: triage: Problem for the up-loading of non-ASCII character file name.

2007-02-07 Thread Gábor Farkas
Michael Radziej wrote: > Gábor Farkas: >> >> 1. we do not mandate yet that GET/POST data is in settings.DEFAULT_CHARSET > > We don't mandate any particular encoding in > settings.DEFAULT_CHARSET? Take a look at ticket #951 and the recent > discussion about it here. i'm sorry, are you sure that i

Re: triage: Problem for the up-loading of non-ASCII character file name.

2007-02-07 Thread Michael Radziej
Gábor Farkas: > but, if i understand correctly, you propose it to behave like: > > > = > filename1 = > request.POST.somehow_get_the_filename_i_do_not_want_to_look_it_up_right_now() > > # let's pray that the user's html templates > # are encoded using settings.DEFAUL

Re: triage: Problem for the up-loading of non-ASCII character file name.

2007-02-07 Thread Gábor Farkas
Michael Radziej wrote: > Gábor Farkas: >> Michael Radziej wrote: >>>* What encoding does python use if you pass unicode to open()? >> for os.listdir it uses sys.getfilesystemencoding(), so i assume it does >> the same for open(). >> >> so usually it does the correct thing. >> >> so using unic

Re: triage: Problem for the up-loading of non-ASCII character file name.

2007-02-07 Thread Michael Radziej
Gábor Farkas: > Michael Radziej wrote: >>* What encoding does python use if you pass unicode to open()? > for os.listdir it uses sys.getfilesystemencoding(), so i assume it does > the same for open(). > > so usually it does the correct thing. > > so using unicode filenames are probably fine

Re: triage: Problem for the up-loading of non-ASCII character file name.

2007-02-07 Thread Gábor Farkas
Michael Radziej wrote: > Hi Tsuyuki! > > tsuyuki makoto: >> Proposed solution: punicode conversion before call >> django.util.text.get_valid_filename. > > Why punycode? I'd think that most filesystems these days support UTF-8 > (though, with different normalization, which *is* a problem). > >

Re: triage: Problem for the up-loading of non-ASCII character file name.

2007-02-06 Thread Michael Radziej
Hi Tsuyuki! tsuyuki makoto: > Proposed solution: punicode conversion before call > django.util.text.get_valid_filename. Why punycode? I'd think that most filesystems these days support UTF-8 (though, with different normalization, which *is* a problem). * Wouldn't it be better to support any

triage: Problem for the up-loading of non-ASCII character file name.

2007-02-06 Thread tsuyuki makoto
I'd like to ask for comments on #3119: problems on FileField/ImageField with multi-byte filenames. Since this problem is caused by two reasons, let me describe them step by step. Multibyte characters in a filename are lost in get_valid_filaname(). -