Commit 4170e6dd authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

utf8_* deprecated

parent cf62a5cb
Loading
Loading
Loading
Loading
Loading
+13 −11
Original line number Diff line number Diff line
@@ -542,17 +542,19 @@ abstract class AbstractAdapter implements AdapterInterface
     */
    public function encodeText($text)
    {
        if ($this->isUtf8()) {
            if (StringUtils::isValidUtf8($text)) {
                return $text;
            }

            return utf8_encode($text);
        }

        if (StringUtils::isValidUtf8($text)) {
            return utf8_decode($text);
        }
        // rien à faire : nos logiciels sont en UTF-8

//        if ($this->isUtf8()) {
//            if (StringUtils::isValidUtf8($text)) {
//                return $text;
//            }
//
//            return utf8_encode($text);
//        }
//
//        if (StringUtils::isValidUtf8($text)) {
//            return utf8_decode($text);
//        }

        return $text;
    }