1
plusangel
saxparser,xhld,headlines and non-english languages
  • 2005/6/28 17:29

  • plusangel

  • Just popping in

  • Posts: 90

  • Since: 2005/2/2 1


After spending much time in past forum questions I found out that the headlines and xhld module can not work with ‘difficult’ languages like Greek because of the built in XML encoding support.

By reading some topics I found that there is file in ./class/xml/ called saxparser.php that does that job and it works mainly with the 3 default encodings (utf8,iso-8859-1 and us-ascii). In some questions they referred to a link
http://www.myxoopsforge.de/dl/saxparser.zip
With an updated saxparser.php but is not working any more.

Does someone have this file?
Or
Does someone know how to edit this file in order to make it work with ISO-8895-7?
Or
I found that Lykos Syndication Module can solve problems of this nature…does anybody use this?

thanks for your time!
The official greek support site for xoops

2
phppp
Re: saxparser,xhld,headlines and non-english languages
  • 2005/6/28 17:53

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


If you use PHP embedded XML parser, the right way:
1 convert XML contents encoded with other charsets to one of the XMLparser valid charsets (utf8,iso-8859-1 and us-ascii)
2 parse contents
3 convert contents from the valid charset to your desired charset

There is alternative technique that does not use the embedded parser and no need the conversions. But the technique is still in an experimental stage.

You could try xmline which is used by most Chinese users for XML parsing with complex charset conversion

3
plusangel
Re: saxparser,xhld,headlines and non-english languages
  • 2005/6/28 18:03

  • plusangel

  • Just popping in

  • Posts: 90

  • Since: 2005/2/2 1


to be honest the first soluton sounds 'greek' to me :)

I downloaded the xmline1.02 form XOOPS china and i'm ready to spend some time with it.I hope this will help.

thanks for the initial guidelines.
The official greek support site for xoops

4
plusangel
Re: saxparser,xhld,headlines and non-english languages
  • 2005/6/28 18:43

  • plusangel

  • Just popping in

  • Posts: 90

  • Since: 2005/2/2 1


I’ve installed xmline and I think I’m in a good direction but…

When I’m in administrator control panel the php debug keeps sending me that:

Warning [PHP]: opendir(c:/inetpub/wwwroot/uploads/xmline/): failed to open dir: Invalid argument in file c:\inetpub\wwwroot\class\xoopslists.php line 110

Anyaway,I proceed to site management then add new site then I added a new XML site with a greek RSS feed
I typed charset of XML encoding: ISO-8859-7
But I do not know what to type in the next box in intermediate encoding for conversion so I left it empty.

Then I use it, update and expand…
The results are:
I succeed to communicate with the rss feed and get the news but the letters are not greek-are some strange symbols indicating that something is wrong.

The rssfeed I’m trying to read is:
http://news.pathfinder.gr/rss/automoto.xml
The official greek support site for xoops

5
LazyBadger
Re: saxparser,xhld,headlines and non-english languages

Be easier, use XHLD... you have to add omly needed charsets conversion into language\greek\headlinerenderer.php
Quis custodiet ipsos custodes?

Webmaster of
XOOPS2.RU
XOOPS Modules Proving Ground
XOOPS Themes Exhibition

6
plusangel
Re: saxparser,xhld,headlines and non-english languages
  • 2005/6/28 20:48

  • plusangel

  • Just popping in

  • Posts: 90

  • Since: 2005/2/2 1


You mean that I will have toedit headlinerenderer_sample.php by replacing WINDOWS-1251 with ISO-8859-7 (witch is the encoding of the RSS feed). Then rename it headlinerender.php and edit in admin.php into _AM_ENCODINGS the IS-8859-7. Is that correct?
The official greek support site for xoops

7
phppp
Re: saxparser,xhld,headlines and non-english languages
  • 2005/6/28 21:43

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


No matter which valid module you use, the logic behind is that three-step-procedure
For charset conversion, you have to add by your local support or by yourself (a more flexible API will be available in next version of XOOPS)

Quote:

Warning [PHP]: opendir(c:/inetpub/wwwroot/uploads/xmline/): failed to open dir


The dir is for category or site images, you need create it by hand and make it writable.

Login

Who's Online

159 user(s) are online (86 user(s) are browsing Support Forums)


Members: 0


Guests: 159


more...

Donat-O-Meter

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

Latest GitHub Commits