[Django] #34766: utils.text: slugify misses "l" when converting "ł"

3 views
Skip to first unread message

Django

unread,
Aug 8, 2023, 8:20:55 AM8/8/23
to django-...@googlegroups.com
#34766: utils.text: slugify misses "l" when converting "ł"
-------------------------------------+-------------------------------------
Reporter: Marcin | Owner: nobody
Wieczorek |
Type: | Status: new
Uncategorized |
Component: Utilities | Version: 4.2
Severity: Normal | Keywords: slugify, utils
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
I expected polish word "żółć" to be slugified as "zolc". Instead `slugify`
returns `zoc`.

{{{
$ pip freeze | grep Django
Django==4.2.4
$ python -V
Python 3.11.3
$ python
>>> from django.utils.text import slugify
>>> slugify("żółć")
'zoc'
>>> slugify("zażółć gęslą jaźń")
'zazoc-gesla-jazn'
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34766>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 8, 2023, 8:29:19 AM8/8/23
to django-...@googlegroups.com
#34766: utils.text: slugify misses "l" when converting "ł"
----------------------------------+--------------------------------------
Reporter: Marcin Wieczorek | Owner: nobody
Type: Uncategorized | Status: closed
Component: Utilities | Version: 4.2
Severity: Normal | Resolution: invalid
Keywords: slugify, utils | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* resolution: => invalid


Comment:

Django uses `NFKD` normalization via `unicodedata.normalize()`. We don't
maintain our own character maps, so there is nothing to "fix" in Django
itself.

--
Ticket URL: <https://code.djangoproject.com/ticket/34766#comment:1>

Django

unread,
Aug 8, 2023, 8:29:30 AM8/8/23
to django-...@googlegroups.com
#34766: utils.text: slugify misses "l" when converting "ł"
----------------------------------+--------------------------------------
Reporter: Marcin Wieczorek | Owner: nobody
Type: Uncategorized | Status: closed
Component: Utilities | Version: 4.2
Severity: Normal | Resolution: invalid
Keywords: slugify, utils | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------
Description changed by Mariusz Felisiak:

Old description:

> I expected polish word "żółć" to be slugified as "zolc". Instead
> `slugify` returns `zoc`.
>
> {{{
> $ pip freeze | grep Django
> Django==4.2.4
> $ python -V
> Python 3.11.3
> $ python
> >>> from django.utils.text import slugify
> >>> slugify("żółć")
> 'zoc'
> >>> slugify("zażółć gęslą jaźń")
> 'zazoc-gesla-jazn'
> }}}

New description:

I expected Polish word "żółć" to be slugified as "zolc". Instead `slugify`
returns `zoc`.

{{{
$ pip freeze | grep Django
Django==4.2.4
$ python -V
Python 3.11.3
$ python
>>> from django.utils.text import slugify
>>> slugify("żółć")
'zoc'
>>> slugify("zażółć gęslą jaźń")
'zazoc-gesla-jazn'
}}}

--

--
Ticket URL: <https://code.djangoproject.com/ticket/34766#comment:2>

Django

unread,
Aug 8, 2023, 8:31:48 AM8/8/23
to django-...@googlegroups.com
#34766: utils.text: slugify misses "l" when converting "ł"
----------------------------------+--------------------------------------
Reporter: Marcin Wieczorek | Owner: nobody
Type: Uncategorized | Status: closed
Component: Utilities | Version: 4.2
Severity: Normal | Resolution: duplicate

Keywords: slugify, utils | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------
Changes (by Mariusz Felisiak):

* resolution: invalid => duplicate


Comment:

Duplicate of #8391.

--
Ticket URL: <https://code.djangoproject.com/ticket/34766#comment:3>

Django

unread,
Aug 8, 2023, 8:34:57 AM8/8/23
to django-...@googlegroups.com
#34766: utils.text: slugify misses "l" when converting "ł"
----------------------------------+--------------------------------------
Reporter: Marcin Wieczorek | Owner: nobody
Type: Uncategorized | Status: closed
Component: Utilities | Version: 4.2
Severity: Normal | Resolution: duplicate
Keywords: slugify, utils | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------

Comment (by Marcin Wieczorek):

Thank you

--
Ticket URL: <https://code.djangoproject.com/ticket/34766#comment:4>

Reply all
Reply to author
Forward
0 new messages