Hi,<br>To support UTF-8 in vtiger CRM, I have made some changes .<br><span style="font-weight: bold;">1.Ajax chat </span><br>I contacted with developer of Ajax chat. I got solution for UTF-8 problem.<br>vchat.php:<br>From:
<br><script type="text/javascript" src="modules/Contacts/js/ajax.js"></script><br><script type="text/javascript" src="modules/Contacts/js/dom-drag_p.js"></script>
<br><script type="text/javascript" src="modules/Contacts/js/css-window_p.js"></script><br><script type="text/javascript" src="modules/Contacts/js/chat.js"></script>
<br>To:<br><script type="text/javascript" charset="iso-8859-1" src="modules/Contacts/js/ajax.js"></script><br><script type="text/javascript" charset="iso-8859-1" src="modules/Contacts/js/dom-drag_p.js"></script>
<br><script type="text/javascript" charset="iso-8859-1" src="modules/Contacts/js/css-window_p.js"></script><br><script type="text/javascript" charset="iso-8859-1" src="modules/Contacts/js/chat.js"></script>
<br>chat.php:<br>From:<br>function submit($msg, $to=0)<br>{<br> $msg = $this->msgParse($msg);<br> ...<br>}<br>To:<br>function submit($msg, $to=0)<br>
{<br> $msg = utf8RawUrlDecode($msg);<br>
$msg = $this->msgParse($msg);<br>
...<br>
}<br><br><span style="font-weight: bold;">2.Add a function in PHP like unescape in javascript</span><br>utils.php:<br>/**<br>* the function is like unescape in javascript<br>* added by dingjianting on 2006-10-1 for picklist editor
<br>*/<br>function utf8RawUrlDecode ($source) {<br> $decodedStr = "";<br> $pos = 0;<br> $len = strlen ($source);<br> while ($pos < $len) {<br> $charAt = substr ($source, $pos, 1);<br> if ($charAt == '%') {
<br> $pos++;<br> $charAt = substr ($source, $pos, 1);<br> if ($charAt == 'u') {<br> // we got a unicode character<br> $pos++;<br> $unicodeHexVal = substr ($source, $pos, 4);
<br> $unicode = hexdec ($unicodeHexVal);<br> $entity = "&#". $unicode . ';';<br> $decodedStr .= utf8_encode ($entity);<br> $pos += 4;<br> }
<br> else {<br> // we have an escaped ascii character<br> $hexVal = substr ($source, $pos, 2);<br> $decodedStr .= chr (hexdec ($hexVal));<br> $pos += 2;
<br> }<br> } else {<br> $decodedStr .= $charAt;<br> $pos++;<br> }<br> }<br> return $decodedStr;<br>}<br><br><br><span style="font-weight: bold;">3. Picklist Editor</span>
<br>UpdateComboValues.php:<br>From:<br>$fldPickList = $_REQUEST['listarea'];<br>To:<br>$fldPickList = $_REQUEST['listarea'];<br>//changed by dingjianting on 2006-10-1 for picklist editor<br>$fldPickList = utf8RawUrlDecode($fldPickList);
<br><span style="font-weight: bold;">4.Ajax Edit</span><br>DetailViewAjax.php in each entity module:<br>From:<br>$fieldvalue = $_REQUEST["fieldValue"];<br>To:<br>$fieldvalue = utf8RawUrlDecode($_REQUEST["fieldValue"]);
<br><br><span style="font-weight: bold;">5.Custom Fields for Asia language</span><br>include/js/customview.js:<br>From:<br> var re1=/^[a-z\d\_ ]+$/i<br> if (!re1.test(str))<br> {<br> alert("Special characters are not allowed in Label field")
<br> return false;<br> }<br> <br>To:<br> /*<br> changed by dingjianting on 2006-10-1 for custom fields in setting module<br> var re1=/^[a-z\d\_ ]+$/i<br> if (!re1.test(str))
<br> {<br> alert("Special characters are not allowed in Label field")<br> return false;<br> }<br> */<br><br>If any problems , Pls feel free to let me know.<br><br>
Thanks and regards,<br>Tim Ding<br><br><br><br><div><span class="gmail_quote">On 10/4/06, <b class="gmail_sendername">Richie</b> <<a href="mailto:richie@vtiger.com">richie@vtiger.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Hi!<br><br>We have our hands full here and we still have more bugs to fix.<br>All contributions are invited for the bug-fixes/features.<br>Do put a blurb here and post it in the trac.<br><br>Thanks,<br><span style="font-weight: bold;">
Richie</span></div>
<br>_______________________________________________<br>Get started with Online collaboration office & productivity tools - <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://zoho.com?vt" target="_blank">
http://zoho.com?vt</a><br><br></blockquote></div><br><br clear="all"><br>-- <br>________________________________________<br>中国开源客户关系管理系统: <a href="http://www.c3crm.com">http://www.c3crm.com</a><br>-----------------------------------------------------------------------