I'm seeing an unexpected URL segment being generated

The content node name is:

Ресурси

However, the generated URL is:

/foundations/uk/resursi/

I would have expected the URL segment to match the node name (or use a URL-encoded version of it), but instead it appears to be transliterated to Latin characters.

Hi @BishalTimalsina12

I think you either need to change ConvertUrlsToAscii or set EnableDefaultCharReplacements to false in app settings if you want to generate different URLs. I don’t know which will work for you so it may need some investigation.

These are global settings so what-ever you change will affect all URLs generated.

Justin

1 Like

I’d plumb for ConvertUrlsToAscii to false in order for you to see Ресурси in the browser address bar.

though with the caveat…
if you highlight example.com/Ресурси in your browser’s address bar, copy it, and paste it into a text editor or a chat message, it suddenly explodes into this: example.com/%D0%A0%D0%B5%D1%81%D1%83%D1%80%D1%81%D0%B8

This happens because the browser safely encodes the Cyrillic characters into Percent-Encoding (URL encoding) the moment it leaves the address bar to ensure it doesn’t break when shared.

Though keep in mind..
Using ASCII (/resursi): Safer for international sharing, lighter on database storage, and prevents those long, ugly percent-encoded links when users copy-paste the URL to share it.

PS EnableDefaultCharReplacements to false will mean you loose all the standard umbraco replacements if you set you own Char Collection

In recent umbraco versions you can leave EnableDefaultCharReplacements as true and it will merge any additions in you Char Collection

Umbraco-CMS/src/Umbraco.Core/Extensions/RequestHandlerSettingsExtension.cs at main · umbraco/Umbraco-CMS

    /// <summary>
    ///     Get concatenated user and default character replacements
    ///     taking into account <see cref="RequestHandlerSettings.EnableDefaultCharReplacements" />.
    /// </summary>
    public static IEnumerable<CharItem> GetCharReplacements(this RequestHandlerSettings requestHandlerSettings)
    {
        if (requestHandlerSettings.EnableDefaultCharReplacements is false)
        {
            return requestHandlerSettings.UserDefinedCharCollection ?? Enumerable.Empty<CharItem>();
        }

        if (requestHandlerSettings.UserDefinedCharCollection == null ||
            requestHandlerSettings.UserDefinedCharCollection.Any() is false)
        {
            return RequestHandlerSettings.DefaultCharCollection;
        }

        // Merges CharCollection and UserDefinedCharCollection, prioritizing UserDefinedCharCollection.
        return MergeUnique(requestHandlerSettings.UserDefinedCharCollection, RequestHandlerSettings.DefaultCharCollection);
    }

1 Like

@mistyn8 @justin-nevitech

Just to add those 3-4 URLs are the case, others are in nativae UK lang. It’s simply what Google had already indexed from the v8 site did a cross checck with live and our. So Umbraco isn’t generating that URLs now, it’s just old indexed URLs resurfacing during the migration? either way we will be going with what it is now /resursi . thanks for info :slight_smile: