1
skara
RSS encoding
  • 2004/10/6 13:15

  • skara

  • Friend of XOOPS

  • Posts: 84

  • Since: 2004/9/24


The default encoding for the produced by XOOPS feed is in UTF8 encoding.
Could anyone tell me how can i change this to iso-8859-7 ?
Thank u 4 ur support.

2
ackbarr
Re: RSS encoding

The code that generates the RSS Feed is /backend.php

In this file there is a line:
header ('Content-Type:text/xml; charset=utf-8');


This needs to be changed to:
header ('Content-Type:text/xml; charset=iso-8859-7');


Then you need to modify the RSS Template in the System Module (system_rss.html)
<?xml version="1.0" encoding="UTF-8"?>

3
skara
Re:RSS encoding
  • 2004/10/6 18:33

  • skara

  • Friend of XOOPS

  • Posts: 84

  • Since: 2004/9/24


i did it but still not working :(

4
ackbarr
Re:RSS encoding

Quote:

skara wrote:
i did it but still not working :(


I'm not familiar with the difference between those encoding types, so forgive me if this question seems elementary. After making the above changes, what indicators do you see that it is not working properly?

5
skara
Re:RSS encoding
  • 2004/10/6 18:55

  • skara

  • Friend of XOOPS

  • Posts: 84

  • Since: 2004/9/24


1st the header is still writing UTF8
2. the letters is not greek [iso-....-7 is for greek lang]

1.i made changes in backend .php
2. i upload again the system_rss.html template file with the changes

did i something wrong?

6
ackbarr
Re:RSS encoding

well the first indicates that you need to update your System module in "System" -> "Modules"

The second is a deeper problem, one that is, honestly, out of my area of understanding.

I'll outline the problem, and maybe someone more knowledgable in internationalization in PHP can help out:

When the rss feed is rendered, the various text data are encoded to UTF-8 like this:
$tpl->assign('channel_title'xoops_utf8_encode(htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)));


There are more lines just like this for each string that needs to be added to the feed.

I think that if your installation of PHP has mbstring support then this should work:
$tpl->assign('channel_title'mb_convert_encoding($xoopsConfig['sitename'], 'iso-8859-7'));

7
skara
Re:RSS encoding
  • 2004/10/7 12:22

  • skara

  • Friend of XOOPS

  • Posts: 84

  • Since: 2004/9/24


Thanx very much 4 ur efforts to help me
much appreciated!

if somebody else has any other idea or suggestion i'm full of ears cause the problem still exist!

anybody from brasilian community maybe could help cause i suppose that they use different code page than english...

Thanx once again

Login

Who's Online

95 user(s) are online (60 user(s) are browsing Support Forums)


Members: 0


Guests: 95


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits