Fix for Autocompleter:
1. uddeim.php: uddeIMcompleteUserName()
After "$input = trim(...)" add one line with "iconv".
Since special characters are UTF-8 encoded when sent I convert these into the character which is used on your site (and your database).
[code:1]
$input = trim( class_exists('JRequest') ? JRequest::getVar('value') : mosGetParam($_REQUEST, 'value', '') );
$input=iconv('UTF-8',$config->charset,$input);
[/code:1]
2. uddeim.php: uddeIMcompleteUserName()
Convert all special characters into UTF-8. This is required since the client expects UTF-8.
[code:1]
// assign results
foreach ( $results as $item ) {
$temp = $item->displayname;
$temp = iconv($config->charset,'UTF-8',$temp);
$items[] = rawurlencode($temp);
}
[/code:1]
3. include.php: uddeIMdoAutocomplete()
The characters are encoded, so unencode these characters.
[code:1]
choice = decodeURI(choice); // was "choice = unescape(choice);"
[/code:1]
Fix for "Shows wrong encoding in recipient box when called from a 3rd party component":
In includes.php and public.php you will find some lines with htmlentities() (search for "htmlentities"):
Modify all occurrences of
[code:1]htmlentities($xxxxxxxxxx, ENT_QUOTES)[/code:1]
with
[code:1]htmlentities($xxxxxxxxxx, ENT_QUOTES, $config->charset)[/code:1]
Do not change the first parameter which I have noted as "$xxxxxxx" here.
Note, that you have to specify which character set you are using in the system tab. When you are using J!1.5 this should be "UTF-8". In Joomla 1.0 (german) it should be "ISO8859-1".
Post edited by: slabbi, at: 2008/05/07 16:01
uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer