PHP Universal Feed Generator 中文問題..

之前忘了在那看到這個 PHP Universal Feed Generator 感覺還滿好用的…
結果就在這幾天要用的時後…
發現他中文在轉碼的時後有問題…
trace 一下他的code 發現是298 行的
htmlentities($tagContent);這個的問題
把他換成
htmlentities($tagContent, ENT_COMPAT, ‘utf-8′);
應該就可以了
另外看了一下他在header 的部份沒有宣告是UTF8
所以我也修改了一下….
在84 行
header(“Content-type: text/xml”);
改一下
header(“Content-type: text/xml; charset=UTF-8″);

基本上這樣應該就可以了…

About johnpupu

..........
This entry was posted in program and tagged . Bookmark the permalink.

One Response to PHP Universal Feed Generator 中文問題..

  1. johnpupu says:

    Test

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word