I am using php to pass a paramter $Kentry to xsl.
$word=trim($_POST['textword']);
$params=array("wordLength" => $length, "Kentry" => $word );
$arg_buffer=array();
$result =xslt_process($xp,$xml_file, $xslt_file, NULL, $arg_buffer, $params).
The $Kentry display in php is correct, the encode is like " á" for some special character, but if i use echo $word, it is reaadable special character.
But on the xsl side,
<xsl:param name="Kentry" />
<!--trim-->
<xsl:variable name="Kentry1" select="substring($Kentry,1, $wordLength)">
<!--get a unicode entity from a xml file-->
<xsl:variable name="Centry"><xsl:value-of select="ENTRY_FORM"/></xsl:variable>
<!--trim-->
<xsl:variable name="Centry1" select="substring($Wentry,1,$wordLength)"/>
<!--try to compare them-->
<xsl:if test="$Centry1=$Kentry1">
......
But it never got equal to each other, even though they are.
Then in the php, I used echo $result, to see the two variable. I found that the $Kentry1 is still "á", but $Centry1 become readable unicode Ñ eventhough it was orginally "á" in the xml file. I wonder why $Kentry1 which was orginally from php text box, still keep this unreadable encoding. So they never can not compare each other in the xsl file.
Is there a way to solve this? I find some idea " Ask for ascii encoding on output". But I am not sure how to do this?
Thanks in advance!