NaSMail and Turkish translation issues
Turks have different character case conversion rules. These rules can
cause lots of issues, if programmers use locale dependent string functions
and assume standard English case conversion rules. This document tries
to cover issues that you might have, if you use NaSMail or SquirrelMail
in Turkish translation. Similar problems can happen in Azerbaijani
and Kurdish translations.
If PHP scripts are executed in Turkish system locale, it might break
scripts or PHP interpreter itself. Issues are not common in older
Unix systems because they don't have correct Turkish translation tables. Linux
systems have better i18n support and it breaks things with PHP and
strtolower/strtoupper/strcasecmp functions. NaSMail and SquirrelMail have
workarounds for Turkish translation, but NaSMail developers can deliberately
disable those workarounds in NaSMail development versions in order to make sure
that interface is coded correctly.
Here goes the list of common issues.
PHP and case insensitive function names
Older PHP versions use locale dependent string comparison in function names.
You got stuck with it, if you get Fatal error: Call to undefined function:
quoteımap() in /some-path/functions/imap_general.php on line xxx
error.
Possible fix:
- Make sure that all function calls are written in lowercase or upgrade PHP
to 4.3.0+ or later version. PHP developers fixed function name issues in
4.3.0.
Charset name conversion to upper case in PHP scripts
Some scripts might call strtoupper on character set name before using it in
IMAP SEARCH, SORT or THREAD queries. You got stuck with it, if you get
İSO-8859-9 charset is not supported error.
Possible fixes:
- Don't use php --with-gettext. But then you lose in performance.
- run localedef tr_TR -i en_US -f ISO-8859-9. This
command creates bogus Turkish locale. You would be breaking the
rules, but it removes the problem.
- If you can't change system locale, make sure that LC_CTYPE is set to C in
functions/i18n.php. SquirrelMail does it in 1.4.2 and later versions. NaSMail
might disable setlocale(LC_CTYPE,'C') calls with two slashes. Fix breaks case
insensitive searches, because system starts using non-Turkish character case
conversion rules. It also breaks all translations that don't set gettext
codeset with bind_textdomain_codeset() function call. In NaSMail translations
must be initialized with custom NaSMail functions that set codeset
correctly. In SquirrelMail it requires custom code similar to the one used in
set_up_language() function.
- NaSMail also includes functions that can be used to do locale independent
string case conversions. If you find code that uses strtoupper, strtolower or
other locale dependent function, when English conversion rules are expected -
inform about it NaSMail developers.
White pages instead of SquirrelMail login page
It can happen with some IE version. IE does not like one header that is send
by SquirrelMail scripts. I don't know IE version, but I have information that
upgrade fixed the problem.
PHP bugs
List of PHP bugs that might affect Turkish translation in NaSMail.
- 16865 - Issue can break
scripts that use variables or functions written in upper case. Should be
solved in PHP 4.3.
- 35050 - Breaks uppercase
classes and methods. Other reports on same issue -
18556,
35583,
40086,
42526. See patch.
- 39993 - NaSMail breaks with white
screen on fatal date_default_timezone_get() error. Error message about time
zone database corruption is suppressed because code is blocking E_STRICT
notices generated in same function call. Affected PHP versions - 5.1.0 -
5.2.0 (tested 5.2.0 and 5.2.1rc2-dev).
This file last modified on 2013-07-23 21:16 CEST
|
Copyright © 2006-2009 The NaSMail Project |