It works for me. See the attached example. Anyway, you don't have to crosspost your question to [EMAIL PROTECTED], which is for developing php internals and irrelevant for such user questions.
Hope this helps Moriyoshi "Michel Sahyoun" <[EMAIL PROTECTED]> wrote: > Does anyone have an example of using XSLT with Sablotron to transform and > XML document containing Shift-jis encoded characters? > > I keep getting the following error message: Illegal Character for Encoding > 'Shift-jis' > > I am using the latest from snap.php.net and sablotron 0.97 FullPack with > iconv, and Javascript. > > In my php file, I call xslt_set_encoding($xsltHandle, 'Shift-jis'); > My xsl file has <xsl:output method="xml" omit-xml-declaration="yes" > encoding="Shift-jis" /> > My XML file has: <?xml version="1.0" encoding="Shift-jis" ?> > > Am I doing something wrong? Is the encoding name misspelled? Anything else I > could check? > > Thanks, > > Michel > > > > -- > PHP Internationalization Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
<?xml version="1.0" encoding="Shift_JIS" ?> <demo> <‚ ‚Í>aha</‚ ‚Í> <‚¢‚Ð>def</‚¢‚Ð> <‚¤‚Ó>ghi</‚¤‚Ó> </demo>
<?php $xp = xslt_create(); xslt_set_encoding($xp, "Shift_JIS"); xslt_process($xp, "test.xml.txt", "test.xsl.txt", "result.xml"); ?>
<?xml version="1.0" encoding="Shift_JIS"?> <•\ xmlns="http://www.w3.org/TR/xhtml1/strict"> <•\—v‘f content="aha"/> <•\—v‘f content="def"/> <•\—v‘f content="ghi"/> </•\>
<?xml version="1.0" encoding="Shift_JIS" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" indent="yes" encoding="Shift_JIS" /> <xsl:template match="demo"> <•\> <•\—v‘f content="{‚ ‚Í}" /> <•\—v‘f content="{‚¢‚Ð}" /> <•\—v‘f content="{‚¤‚Ó}" /> </•\> </xsl:template> </xsl:stylesheet>
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php