#16315: FileSystemStorage.listdir returns names with unicode normalization form that is different from names in database -------------------------------------+------------------------------------- Reporter: philomat | Owner: nobody Type: Bug | Status: new Milestone: | Component: File Version: 1.3 | uploads/storage Resolution: | Severity: Normal Triage Stage: | Keywords: storage unicode Unreviewed | normalization Needs documentation: 0 | Has patch: 0 Patch needs improvement: 0 | Needs tests: 0 UI/UX: 0 | Easy pickings: 0 -------------------------------------+------------------------------------- Changes (by aaugustin):
* needs_better_patch: => 0 * needs_tests: => 0 * needs_docs: => 0 Comment: If I understand correctly, the bug is the fact that the file name is normalized in NFC form in the database and in NFD form on the filesystem. Django doesn't do any unicode normalisation — well, it does in two places, but they're obviously unrelated to the situation you describe. Maybe the normalization in NFC form appears when the string round-trips in the database. Or maybe the normalization in NFD form appears when the file is written on the file system. In both cases, that's outside the control of Django, but I'd like to understand what happens. Can you test: - writing a file called `u'\xe4'`, then `listdir()`, and see if it has turned into `u'a\u0308'`? - saving the string `u'a\u0308'` in the database (in any `CharField`), then retreive it, and see if it has turned into `u'\xe4'` Also, which database and which filesystem are you using? -- Ticket URL: <https://code.djangoproject.com/ticket/16315#comment:1> Django <https://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.