[i18n] non-translation but charset related problem + solution

Ivan Noris noris at bgs.sk
Tue Feb 18 16:33:27 PST 2003


Hello,
	I know this is not the appropriate list, and I'm sorry, but I don't
have time to subscribe to other lists and maybe you can confirm my
problem/solution too..

	I configured Turba 1.2 RC1 to use shared LDAP directory. The LDAP is
Sun One Directory Server running on Sol8, using UTF8 encoding. I used
"'encoding' => 'utf8'" in the sources.php LDAP server definition, but
the charset was "mangled". The problem seems to be in the PHP function
utf8_decode, (always?) returning ISO-8859-1 string.

	We use Latin2 (iso8859-2) encoding - so the solution was to replace the
original line in turba/lib/Driver/ldap.php

$result[$field] .= utf8_decode($entry[$field][$j]);

with following one:

$result[$field] .= recode("utf8..latin2", $entry[$field][$j]);

I had to install php4-recode package (on Debian) first.

If anybody had the same problem, maybe this hack could be of any help
for you. Or, if there's something I really missed, please, let me know.

-- 
                                         Ing. Ivan Noris, noris at bgs.sk
                        System engineer, Business Global Systems, a.s.
    ________________________________________________________________
   |__|__|__|__|  "and when they've given you their all |__|__|__|__|
  |__|__|__| some stagger and fall, after all it's not easy |__|__|__|
   |__|__| banging your heart against some mad bugger's wall" |__|__|
    _________________________________________________VIX/icq#126667131




More information about the i18n mailing list