#2391 closed defect (fixed)
title case not handling UTF8 correctly
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Template system | Version: | |
Severity: | normal | Keywords: | unicode-branch |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | yes | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
Since Django is basically a UTF8 based platform, it should perfom .title() on utf-8 strings. It assumes unicode. I think this diff fixes the problem.
Attachments (1)
Change History (7)
by , 18 years ago
Attachment: | titlecase.diff added |
---|
comment:1 by , 18 years ago
comment:2 by , 18 years ago
Has patch: | set |
---|---|
Needs tests: | set |
Patch needs improvement: | set |
Triage Stage: | Unreviewed → Accepted |
please modify this patch and use settings.DATABASE_ENCODING instead of utf8. If possible, please add a test case.
comment:3 by , 17 years ago
As far as I can thell there is no such thing as settings.DATABASE_ENCODING would DEFAULT_CHARSET not be better?
comment:4 by , 17 years ago
Keywords: | unicode-branch added |
---|
This patch is no longer relevant in light of the UnicodeBranch. The problem has been fixed on that branch. I'll close it when the branch is merged.
(to answer your question, for curiosity's sake: yes.)
comment:5 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
This patch assumes utf-8 encoding, which isn't safe to assume.