[PHP] strtr function OS-reltated problem
- by Casidiablo
Hello there!
I have this funtion that converts all special chars to uppercase:
function uc_latin1($str) {
if(!defined("LATIN1_UC_CHARS"))
define("LATIN1_UC_CHARS", "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝ");
if(!defined("LATIN1_LC_CHARS"))
define("LATIN1_LC_CHARS", "àáâãäåæçèéêëìíîïðñòóôõöøùúûüý");
$str = strtoupper ( strtr ( $str, LATIN1_LC_CHARS, LATIN1_UC_CHARS ) );
return $str;
}
This function works fine in my development PC (which runs Windows XP)... but, when I test it in the production server (running Redhat Linux) it does not uppercase the string. The string is ISO-8859-1 encoded.
How can I make it work in Linux too?
Thanks for reading.