The latest code of utf8RawUrlDecode in utils.php:<br>function utf8RawUrlDecode($str) {<br>$str = rawurldecode($str);<br>&nbsp;&nbsp;&nbsp; preg_match_all(&quot;/(?:%u.{4})|&amp;#x.{4};|&amp;#\d+;|.+/U&quot;,$str,$r);<br>&nbsp;&nbsp;&nbsp; $ar = $r[0];<br>
&nbsp;&nbsp;&nbsp; foreach($ar as $k=&gt;$v) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(substr($v,0,2) == &quot;%u&quot;)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $ar[$k] = iconv(&quot;UCS-2&quot;,&quot;UTF-8&quot;,pack(&quot;H4&quot;,substr($v,-4)));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; elseif(substr($v,0,3) == &quot;&amp;#x&quot;)
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $ar[$k] = iconv(&quot;UCS-2&quot;,&quot;UTF-8&quot;,pack(&quot;H4&quot;,substr($v,3,-1)));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; elseif(substr($v,0,2) == &quot;&amp;#&quot;) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //echo substr($v,2,-1).&quot;&lt;br&gt;&quot;;
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $ar[$k] = iconv(&quot;UCS-2&quot;,&quot;UTF-8&quot;,pack(&quot;n&quot;,substr($v,2,-1)));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; $str1 = join(&quot;&quot;,$ar);<br>&nbsp;&nbsp;&nbsp; $str1 = nl2br($str1);<br>&nbsp;&nbsp;&nbsp; return $str1;<br>}
<br><br>above code is able to solve problems for the ajax edit with utf characters.<br><br><div><span class="gmail_quote">On 2/19/07, <b class="gmail_sendername">Erik Bent</b> &lt;<a href="mailto:erik@bentware.nl">erik@bentware.nl
</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello team,<br><br>I finally found a solution for the ajax edit with utf characters (I
<br>hope). The entered text is transformed to a string without % character<br>(in dtlviewajax.js: % =&gt; |) and then send to php (routine<br>utf8RawUrlDecode in utils.php). There the | character is translated to %<br>and the %XX and %uXXXX are translated to characters.
<br>I have used html_entity_decode to convert &amp;#911; back to unicode for php<br>5 (according to <a href="http://www.php.net">www.php.net</a>). In php 4 the text stays &amp;#911; but on the<br>screen the correct character is displayd (Ώ).
<br><br>Regards,<br>Erik<br>_______________________________________________<br>Reach hundreds of potential candidates - <a href="http://jobs.vtiger.com">http://jobs.vtiger.com</a> </blockquote></div><br><br clear="all"><br>
-- <br>________________________________________<br>中国开源客户关系管理系统: <a href="http://www.c3crm.com">http://www.c3crm.com</a><br>-----------------------------------------------------------------------