#16853: Slugify removes dotless "i"
--------------------------+---------------------------------
Reporter: yasar11732@… | Owner: nobody
Type: Bug | Status: new
Milestone: | Component: Template system
Version: 1.3 | Severity: Normal
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Easy pickings: 0
UI/UX: 0 |
--------------------------+---------------------------------
Hi,
As a Turkish Django user, I need to use slugify with strings containing
Turkish dotless i. As most Turkish developers, I also expect it to convert
that character to ascii "i", however, It just disappears in resulting
string. As for now, I am using a workaround I have found in here:
http://gokmengorgen.net/post/detail/djangoda-turkce-destekli-slugify/
Here is the workaround I currently use:
{{{
def slugify_unicode(value):
value = value.replace(u'\u0131', 'i')
value = normalize('NFKD', value).encode('ascii', 'ignore')
value = unicode(sub('[^\w\s-]', '', value).strip().lower())
return sub('[-\s]+', '-', value)
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/16853>
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.