Detect encoding and make everything UTF-8

前端 未结 24 2915
暗喜
暗喜 2020-11-22 03:03

I\'m reading out lots of texts from various RSS feeds and inserting them into my database.

Of course, there are several different character encodings used in the fee

24条回答
  •  梦谈多话
    2020-11-22 03:09

    A really nice way to implement an isUTF8-function can be found on php.net:

    function isUTF8($string) {
        return (utf8_encode(utf8_decode($string)) == $string);
    }
    

提交回复
热议问题