Hello,

I have two servers, one Apache 1.3.x running on Mac OS X and one Apache 2.x running on Debian, both with PHP 5.1.x compiled with gettext.

On the Mac OS X server, everything is working correctly. I get the right translations in the right encodings. But on the Debian server, the msgids which are not strictly US-ASCII remain untranslated.

I use the following code to localize my website, which is entirely in UTF-8 (all the PHP files are in UTF-8, and the messages file are encoded as UTF-8) :

putenv("LANG=$language");
putenv("LC_ALL=$language");
setlocale(LC_ALL, $language);

$domain = 'messages';
bindtextdomain($domain, "./locale");
bind_textdomain_codeset($domain,"UTF-8");
textdomain($domain);


where "language" is either (fr_FR.utf8 or en_GB.utf8) on my Debian host, or (fr_FR.UTF-8 or en_GB.UTF-8) on my OS X host, to match the available locales.

If I've understood correctly the docs, gettext does a binary comparison between the msgids, so if the files are in the same encoding, the lookup should not fail. Does anyone know what differences between the two platforms causes these different behaviours ? Or does anyone see any bug in the code ?

Thank you in advance,

--
Thomas Deniau

--
PHP Unicode & I18N Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to