Non-latin characters in page paths and slugs

  • Hello,

    I would like to be able to use non-Latin characters in page paths and slugs. It is not uncommon to use non-Latin characters in page paths. Here is an example:المملكة_المتحدة

    It seems page paths (automated generation on page creation), the slug field type and PerchUtil::urilify() do not handle this.

    Based on what I attempted it seems the page paths need to be url encoded in the database for Runway to be able to find the page. The above example would need to be:


    And this also extends to routes as non-Latin characters in URL patterns need to be encoded too.

    In Perch Runway 3.x I'm working around this with:

    1. a custom route token
    2. a custom slug field type
    3. Javascript that I'm adding to the control panel to encode the value of the relevant fields before form is submitted

    I'm ok with (1) and (2). Perch is designed to handle this sort of customisations. However, (3) is a little hacky. It would be nice if Perch Runway v4 tackles this.

    Use cases:

    • Building non-English websites
    • Building multi-lingual websites
    • Migrating from a CMS that supports this to Runway - e.g. I was tasked with migrating some blog posts from a WordPress site to a Runway Collection. Some of the WordPress posts had URLs that contained non-Latin characters.