#8391: Results of slugify in the admin interface differ from the one in shell.
------------------------------------+---------------------------------------
          Reporter:  bjornkri       |         Owner:  nobody
            Status:  new            |     Milestone:        
         Component:  Uncategorized  |       Version:  SVN   
        Resolution:                 |      Keywords:        
             Stage:  Unreviewed     |     Has_patch:  0     
        Needs_docs:  0              |   Needs_tests:  0     
Needs_better_patch:  0              |  
------------------------------------+---------------------------------------
Comment (by julien):

 The reason why it doesn't give the same result in the admin and via the
 code above is that different algorithms are used.
 In the admin, it is done with some javascript, and odd characters are
 replaced by their latin 'equivalent', in particular:

 {{{
 var LATIN_MAP = {
    ...
    'ΓΈ': 'o',
    ...
 }
 }}}

 In the template filter, odd characters that are not representable in ASCII
 are simply stripped out, see the 'ignore' below:

 {{{
 value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore')
 }}}

 Maybe the filter should replicate the javascript's algorithm, or vice
 versa, to make things homogeneous?

-- 
Ticket URL: <http://code.djangoproject.com/ticket/8391#comment:3>
Django Code <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 [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
-~----------~----~----~----~------~----~------~--~---

Reply via email to