WordPress.org

Make WordPress Core

Opened 3 months ago

Closed 3 months ago

#53684 closed defect (bug) (worksforme)

Faulty substitution of German umlauts in slugs and keywords

Reported by: spielautomat4 Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Permalinks Keywords:
Focuses: Cc:

Description

Just submitted #53682 because handling of keywords seemed odd.

In addition to that I just noticed that German umlauts in post slugs and new keywords are no longer substituted correctly. When using "ü" in a post title, for example, the letter used to be replaced by "ue" in the slug (which is correct from a grammatical standpoint).

There are a lot of old posts in my blog that proof, this was done correctly in the past. With the latest WordPress 5.7.2, however, German umlauts are no longer replaced by "ue", "oe" or "ae". Instead WordPress now uses "u", "o" or "a" for substitution (which is not correct).

This also applies to "ß" being replaced by "ss" (now only "s").

Not sure, though, if this change was a design decision or is a bug.

Attachments (2)

buesserhemd.png (4.6 KB) - added by Presskopp 3 months ago.
Capture d’écran 2021-07-18 à 10.35.26.png (93.1 KB) - added by audrasjb 3 months ago.
Looks good with Classic Editor as well

Download all attachments as: .zip

Change History (13)

#1 @audrasjb
3 months ago

  • Keywords reporter-feedback added

Hello and thank you for opening this ticket @spielautomat4,

What is the locale of your website?
Are you using any translation/multilingual plugin?

If you website uses the de_DE locale, it should convert ß to ss and ä to ae.

Here is the related source code of remove_accent() function in 5.7.2: https://core.trac.wordpress.org/browser/tags/5.7.2/src/wp-includes/formatting.php#L1922

        // Used for locale-specific rules.
        $locale = get_locale();
 
        if ( in_array( $locale, array( 'de_DE', 'de_DE_formal', 'de_CH', 'de_CH_informal', 'de_AT' ), true ) ) {
            $chars['Ä'] = 'Ae';
            $chars['ä'] = 'ae';
            $chars['Ö'] = 'Oe';
            $chars['ö'] = 'oe';
            $chars['Ü'] = 'Ue';
            $chars['ü'] = 'ue';
            $chars['ß'] = 'ss';

#2 @Presskopp
3 months ago

  • Keywords needs-patch added

Bug confirmed

Version 0, edited 3 months ago by Presskopp (next)

This ticket was mentioned in Slack in #polyglots by presskopp. View the logs.


3 months ago

This ticket was mentioned in Slack in #core by presskopp. View the logs.


3 months ago

#6 @audrasjb
3 months ago

That's very strange. I can't reproduce this on my side:

  • using WordPress 5.8 RC 4
  • switching to de_DE
  • new post
  • post title: Test permalinkß deutsch
  • hit "Publish" button
  • result: http://localhost/2021/07/18/test-permalinkss-deutsch/

Looks good to me 🤨

#7 @audrasjb
3 months ago

Ah. I was using the block editor.

@audrasjb
3 months ago

Looks good with Classic Editor as well

#8 @audrasjb
3 months ago

In buesserhemd.png I think we have the desired behavior: ß is replaced with s because you're not on a Deutsch WordPress installation

#9 @Presskopp
3 months ago

looks like I accidentally posted a screenshot using an english environment, my bad. Still there's some kind of issue, which looks to appear only temporal after all I can say atm.

#10 @spielautomat4
3 months ago

  • Keywords close added; reporter-feedback needs-patch removed

My bad, in this case I did indeed observe this behaviour on an en_US installation. With the language set to de_DE, the substitution of German umlauts is as desired for post slugs.

I think we can close this ticket. I was not aware of the fact that the handling is different based on the installation's language. Sorry for any trouble caused.

The other issue that I reported in #53682, however, still remains. Even with de_DE.

#11 @audrasjb
3 months ago

  • Keywords close removed
  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed
  • Version 5.7.2 deleted

Thank you for the confirmation, @spielautomat4!

Closing as worksforme.

Note: See TracTickets for help on using tickets.