Detect encoding and make everything UTF-8

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

    Working out the character encoding of RSS feeds seems to be complicated. Even normal web pages often omit, or lie about, their encoding.

    So you could try to use the correct way to detect the encoding and then fall back to some form of auto-detection (guessing).

提交回复
热议问题