Detect encoding and make everything UTF-8

前端 未结 24 2745
暗喜
暗喜 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:08

    After sorting out your php scripts, don't forget to tell mysql what charset you are passing and would like to recceive.

    Example: set character set utf8

    Passing utf8 data to a latin1 table in a latin1 I/O session gives those nasty birdfeets. I see this every other day in oscommerce shops. Back and fourth it might seem right. But phpmyadmin will show the truth. By telling mysql what charset you are passing it will handle the conversion of mysql data for you.

    How to recover existing scrambled mysql data is another thread to discuss. :)

提交回复
热议问题