[wp-trac] [WordPress Trac] #54088: Uploading media containing Norwegian letter å does not automatically readjust it to become aa.

WordPress Trac noreply at wordpress.org
Wed Apr 27 15:52:36 UTC 2022


#54088: Uploading media containing Norwegian letter å does not automatically
readjust it to become aa.
------------------------------------------+-------------------------
 Reporter:  paaljoachim                   |       Owner:  nielslange
     Type:  defect (bug)                  |      Status:  assigned
 Priority:  normal                        |   Milestone:  6.0
Component:  Media                         |     Version:
 Severity:  normal                        |  Resolution:
 Keywords:  needs-patch needs-unit-tests  |     Focuses:
------------------------------------------+-------------------------

Comment (by SergeyBiryukov):

 Replying to [comment:11 knutsp]:
 > Replying to [comment:9 paaljoachim]:
 > > If I write Norwegian with an English keyboard I would use the aa
 instead of å.
 >
 > Good point, and this was mentioned back then. Also international
 standards on the field. However, writing is slightly different than slugs,
 as distinguishing between "a" and "å" might feel needed.
 >
 > So, it was argued from a conservative point of view, don't change what
 works just fine. That a change was made just for Danish surprised me a
 bit, but that effectively silenced the discussion.

 For reference, [26585] / #23907 appears to be the related change.

 Replying to [comment:10 johnbillion]:
 > There's already a test for this but only for the `remove_accents()`
 function, not that it actually applies those transformations to the name
 of an uploaded file. https://github.com/WordPress/wordpress-
 develop/blob/16b04903feec8216bdd2e6230f4ad511a9238db1/tests/phpunit/tests/formatting/removeAccents.php#L15

 There is a
 [source:tags/5.9.3/tests/phpunit/tests/formatting/sanitizeFileName.php#L23
 test with some of the mentioned characters] for `sanitize_file_name()`
 too, see [48603] / #22363. If that doesn't always work as expected,
 something else might be involved.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54088#comment:27>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list