开发者

Find/Replace using Carp

开发者 https://www.devze.com 2022-12-14 04:26 出处:网络
I use carp free 3.6.4 to display content from some wordpress rss feeds onto a web page but there are always encoding errors (I get the diamond question (U+DDDF) whenever a blog user uses curly quotes

I use carp free 3.6.4 to display content from some wordpress rss feeds onto a web page but there are always encoding errors (I get the diamond question (U+DDDF) whenever a blog user uses curly quotes and also after all question marks that are followed by spaces). I went into carp.php looking for the output s开发者_如何转开发o I can do an str_replace('U+DDDF','',$carpoutput) But when I do this, I can't change anything. In almost every case the diamond replacing something I want in there, but is totally extraneous so I figured just replacing them with '' would be the thing to do.

Their documentation is really difficult for me to get through, does anyone with experience using it know how to accomplish this? Thanks in advance.


Most likely, the RSS feeds are encoded in UTF-8, and your website in some other encoding (IS-8859-1?) you can try using utf8_decode on the content you fetch from wordpress.

If that doesn't solve your problem, you will have to find out what encodings are used where.

0

精彩评论

暂无评论...
验证码 换一张
取 消