Parsing UTF-8 string with XSLT

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hello, the majority of my sites use PHP MYSQL and XSLT for dynamic
pages and all of it works ok for English characters. The problem begins
when I try to use Romanian or Russian characters while creating the XML

What I used to do is:
1) Query the MYSQL database that is UTF-8 (the conection is also set by
a query to UTF-8)
2) Create a XML string in PHP using the query results
3) Transform the XML string using a XSLT parser

As I said it all works ok with the English data but when I try using
Russian instead of letters I get question signs. If I try to echo the
Russian text when creating the XML data it is displayed correctly, so
the problem is in the XML string that is somehow not UTF-8  encoded or

Can someone help me?

Re: Parsing UTF-8 string with XSLT

Which version of PHP are you using? Which XML functions - DOM XML or XML?  
Which xslt engine - Sablotron or XSL?

Tony Marston

Quoted text here. Click to load it

Re: Parsing UTF-8 string with XSLT

Thank you! I already found the problem. It is a validator class that
was just cutting all the Russian characters away from the string before
processing. I just didn't notice that in the first place. Sorry.

Site Timeline