Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Well, yes. But you must unfortunately modify the library. The author of the library uses <code>utf8_encode/utf8_decode</code> obviously without understanding what they do at all.</p> <p>On line 150, of <code>Shared/String.php</code>:</p> <p>Replace</p> <pre><code>public static function IsUTF8($value = '') { return utf8_encode(utf8_decode($value)) === $value; } </code></pre> <p>With</p> <pre><code>public static function IsUTF8($value = '') { return mb_check_encoding($value, "UTF-8"); } </code></pre> <p>Then, if you do</p> <pre><code>$ grep -rn "utf8_encode" . </code></pre> <p>On the project root, you will find all lines where <code>utf8_encode</code> is used. You will see lines like</p> <pre><code>$linkSrc = utf8_encode($linkSrc); //$linkSrc = $linkSrc; $givenText = utf8_encode($text); //$givenText = $text; </code></pre> <p>You can simply remove the <code>utf8_encode</code> as shown in the comments.</p> <p>Why is <code>utf8_encode/utf8_decode</code> wrong? First of all, because that's not what they do. They do <code>from_iso88591_to_utf8</code> and <code>from_utf8_to_iso88591</code>. Secondly, ISO-8859-1 is almost never used, and usually when someone claims they use it, they are actually using Windows-1252. ISO-8859-1 is a very tiny character set, not even capable of encoding <code>€</code>, let alone arabic letters.</p> <p>You can do fast reviews of a library by doing:</p> <pre><code>$ grep -rn "utf8_\(en\|de\)code" . </code></pre> <p>If you get matches, you should move on and look for some other library. These functions simply do the wrong thing every time, and even if someone needed some edge case to use these functions, it's far better to be explicit about it when you really need ISO-8859-1, because you normally never do.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload