Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2006-08-09 06:04:52
- naiadray
- New Member
- Registered: 2005-03-30
- Posts: 9
RSS problem in CHinese
Hi there,
I’ve upgraded my TXP to 4.0.3 recently, however i am experiencing problem withe RSS.
Before the RSS can be correctly displayed in rss reader, but now the title of the site (only title, other content are displayed fine) can not be displayed in correct chinese character… instead it’s all question mark
does anyone know how to correct this problem?
many thanks in advance!!
airo
Offline
#2 2006-08-09 08:02:37
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: RSS problem in CHinese
Can you post an example link please?
Also bear in mind that RSS feeds have changed significantly since 4.0.3, for the forthcoming 4.0.4 release.
Alex
Offline
#3 2006-08-09 08:54:31
- naiadray
- New Member
- Registered: 2005-03-30
- Posts: 9
Re: RSS problem in CHinese
this is my rss link
http://www.kidulthood.com/ape3ape4/index.php?section=article&rss=1
as u can see, the content is in correct encoding, but title is ??? which suppose to be three chinese characters..
thanks!
Offline
#4 2006-08-09 23:17:39
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: RSS problem in CHinese
If you can, try editing rss.php and changing this line (near the top, around line 28):
$out[] = tag(doSpecial($sitename),'title');
to this:
$out[] = tag(escape_title($sitename),'title');
or alternatively:
$out[] = tag(htmlspecialchars($sitename, ENT_COMPAT, 'UTF-8'),'title');
Last edited by zem (2006-08-09 23:23:56)
Alex
Offline
#5 2006-08-10 01:29:29
- naiadray
- New Member
- Registered: 2005-03-30
- Posts: 9
Re: RSS problem in CHinese
thank you alex for your reply
i tried both method, but they don’t work….
i even tried to hardcode the name inside that line (not sure if i did that right…. i am not too familiar with coding)
$out[] = tag(“xxx”) , ‘title’);
where xxx is the 3 chinese characters
but result comes out even worse… IE gives me error when trying to read the rss feed..
thank again!!
Offline
#6 2006-08-10 02:05:15
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: RSS problem in CHinese
but result comes out even worse… IE gives me error when trying to read the rss feed..
What error?
Alex
Offline
#7 2006-08-10 02:08:42
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: RSS problem in CHinese
I’m not sure this is a feed problem. Your whole site seems to be incorrectly encoded.
You should check the PHP mbstring.encoding_translation setting.
Last edited by zem (2006-08-10 02:09:58)
Alex
Offline
#8 2006-08-10 02:47:17
- naiadray
- New Member
- Registered: 2005-03-30
- Posts: 9
Re: RSS problem in CHinese
IE didn’t give detail report on the error… it just says it cant open the feed..
i checked the mbstring.encoding_translation setting, it’s already off
if the whole site is incorrectly encoded, is there anything i can do?
the fact is… long time ago when i upgraded from g1.9 (if the name is correct) to a RC3.. i had a really bad experience that all articles turned into question marks… so i did a research on internet and finally found someone mentinoed that i should add a line –
$charset = $method(“SET CHARACTER SET utf8”,$DB->link);
before the line
$result = $method($q,$DB->link);
in txp_lib.php file
and also change the database collation to “utf8_general_ci”
which i did and sucessfully solved the problem of ?? marks article
but the rss feed still cannot be shown correctly at that time and i couldn’t find any solution… so i copy the rss.php and overwrite the newer version rss.php in RC3 … probably that’s not what i should suppose to do, but at least that solve my problem at that time
this time when i upgrade to 4.0.3 … the rss feed comes out beautifully except for the title… …
that’s the whole story… ^^
could there be any solution??
thanks!!
Offline
#9 2006-08-10 12:21:20
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: RSS problem in CHinese
if the whole site is incorrectly encoded, is there anything i can do?
My mistake, perhaps – looks like Chinese has stopped working on my system for some reason. http://www.kidulthood.com/ape3ape4/index.php is showing all messed up here, but I think that’s just me.
IE didn’t give detail report on the error… it just says it cant open the feed..
Hard to know what went wrong then. Could’ve been a PHP syntax error.
Alex
Offline
#10 2006-08-11 02:34:49
- naiadray
- New Member
- Registered: 2005-03-30
- Posts: 9
Re: RSS problem in CHinese
thanks alex for ur time
i just got one last question … can i hardcode the name of my site inside the rss.php codes instead of dynamically read ?? i am just thinking would that be a simple way to get them displayed properly ..
thanks again!!
Offline
#11 2006-08-11 23:25:35
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: RSS problem in CHinese
You could. You’ll have to modify it every time you upgrade though.
It’d be much better if we could find a proper fix.
Alex
Offline
Pages: 1