#10254: The use of 'FileField' Upload file missing Chinese characters (non-ascii) -------------------------------------------+-------------------------------- Reporter: isoem...@163. com | Owner: nobody Status: new | Milestone: 1.1 Component: File uploads/storage | Version: 1.0 Resolution: | Keywords: FileField non-ascii Stage: Accepted | Has_patch: 0 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | -------------------------------------------+-------------------------------- Changes (by kmtracey):
* milestone: => 1.1 Comment: Can anyone with more history than I have comment on the proposed change to get_valid_filename? The very restrictive version that strips out all but A-Z, a-z, dot, dash, and underscore has been there since day 1 as far as the public Django repository goes, so I can't get any sense for the reason why it was made so restrictive. I don't see the harm in allowing unicode alphanumerics, and I get the impression this was thought to have already been fixed -- see #6009, where tests were added that attempt to verify files with non-ASCII chars can be uploaded...only the tests don't go so far as to actually save the file to the file system, which is when the non-ASCII chars are being stripped. I've tested uploading files with non-ASCII chars on Ubuntu and Windows, and they both work fine. The only potential problem I see is that an English Windows box doesn't necessarily display really exotic (e.g. Japanese and Chinese) characters in file names correctly in either a command prompt or the file explorer, so it allows them but doesn't really fully support them. I'd expect there are versions of Windows that handle this better but all I have is plain English Windows...and even there all you get are files that may be a little difficult to deal with since you cannot type their names, but you can still get auto-complete to do it for you, or select them via a GUI, etc. At any rate it seems we should be able to resolve this one way or the other for 1.1. -- Ticket URL: <http://code.djangoproject.com/ticket/10254#comment:3> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---