Ticket #1485470 (closed Patches: fixed)
Setting locale to tr_TR breaks PHP
| Reported by: | hayalci | Owned by: | till |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.2-stable |
| Component: | PHP backend | Version: | 0.2-beta |
| Severity: | normal | Keywords: | |
| Cc: | gokdenizk@… |
Description
Hi,
There is an odd problem with Turkish language and PHP. To cut it short, in Turkish there are "dotted capital I" and "dotless i" characters, and "i != I"
PHP calls strtolower() on function/class name before function calls. if the system locale is set to tr_TR, functions that contain "I" in their name cannot be found and called.
As roundcube sets locale to the selected language, using Turkish translation OR a browser which lists Turkish as preferred language is impossible currently. I get a white page and the following error in the logs.
The error I got.
PHP Fatal error: Call to undefined method MDB2_Driver_Datatype_sqlite::getDBInstance() in ./roundcubemail/program/lib/MDB2/Driver/Datatype/Common.php on line 1117
The attached patch fixes the issue by setting locale to "en_US" if user requests "tr_TR". This solved the problem and it worked with the Turkish translation of the interface. No side effects to non-Turkish users.
For more info about this Turkish locale problem:
