We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27889
    • 415 Posts
    I found this script very usefull, after trying one day to convert "aéàçèê" in "aeacee" because strtr and other php function don’t work with my utf-8. You must have php >=4.03 and mbstring module enabled. and 4.0.6 for auto detection, else use the string "UTF-8"
    So here the script (not from me),original find it at: http://fr.php.net/manual/fr/function.mb-convert-encoding.php
    <?php
    /**
     * @args string $text line of encoded text
     *      string $from_enc (encoding type of $text, e.g. UTF-8, ISO-8859-1)
     *
     * @returns 7bit representation
     */
    function to7bit($text) {
       $text = mb_convert_encoding($text,'HTML-ENTITIES',mb_detect_encoding($text));
       $text = preg_replace(
           array('/ß/','/&(..)lig;/',
                 '/&([aouAOU])uml;/','/&(.)[^;]*;/'),
           array('ss',"$1","$1".'e',"$1"),
           $text);
       return $text;
    } 
    ?>
    

    Enjoy smiley
    Johannes

    I’d like if this (or kind of this) is added to the new release for aliases creation, that’s why I put it here.
      MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
      MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]
      • 4195
      • 398 Posts
      I took the liberty to add this also to the PHx custom modifiers list. grin
        Armand Pondman
        MODx Coding Team
        :: Jot :: PHx
        • 27889
        • 415 Posts
        Good thing, can you keep the name of the author please : Johannes
          MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
          MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]