1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Not a Bug Tag links character encoding problem

Discussion in 'Resolved Bug Reports' started by Eagle, Jul 19, 2015.

  1. Eagle

    Eagle Well-Known Member

    I'm using this values in Link.php

    Code:
    $title = strtr($title, array(
            '"' => '',
            "'" => '',
            "“" => '',
            "”" => '',
            "’" => '',
            "Ö" => "o",
            "ö" => "o",
            "C" => "c",
            "c" => "c",
            "Ğ" => "g",
            "ğ" => "g",
            "Ş" => "s",
            "ş" => "s",
            "Ü" => "u",
            "ü" => "u",
            "İ" => "i",
            "ı" => "i",
            "Ç" => "c",
            "ç" => "c",
            "é" => "i",
            "â" => "a",
            "Ê" => "e",
            "Â" => "a",
            "?" => "_",
            "*" => "_",
            "." => "_",
            "," => "_",
            ";" => "_",
            ")" => "_",
            "(" => "_",
            "{" => "_",
            "}" => "_",
            "[" => "_",
            "]" => "_",
            "!" => "_",
            "+" => "_",
            "%" => "_",
            "&" => "_",
            "#" => "_",
            "$" => "_",
            "=" => "_",
            "ê" => "e",
            "." => "-"
            ));
    
    Works pretty good in forums, threads and member links.

    However in tags, some characters doesn't work like this.

    Ö -> oe
    Ü -> ue
    ö -> oe
    ü -> ue

    Example:
    tags/öğretim -> tags/oegretim
    tags/üniversite -> tags/ueniversite

    In fact, it should be like this;
    tags/öğretim -> tags/ogretim
    tags/üniversite -> tags/universite
     
  2. Mike

    Mike XenForo Developer Staff Member

    That file isn't used in this situation. The URL versions are created via a standard romanization and deaccenting. The deaccenting process translates those as you've seen (which is correct in German, IIRC). This is a situation where it will roughly be incorrect for one set of people no matter the choice, but it wouldn't really be an appropriate thing to change at this point.

    If you're trying to change the deaccent process, you should change the deaccent table in the UTF-8 functions directly.
     
    Eagle likes this.

Share This Page