note 55359 deleted from function.strtoupper by hholzgra
| From: | hholzgra@php.net | Date: | Thu, 02 Aug 2012 13:06:04 +0000 |
| Subject: | note 55359 deleted from function.strtoupper by hholzgra | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-189700@lists.php.net to get a copy of this message | ||
Note Submitter: julas
----
The code for Polish programmers was spolied a little bit - \xB3 should be turned into \xA3, not the
opposite. So the correct code is:
function str2upper($text){
return strtr($text,
"abcdefghijklmnopqrstuvwxyz".
"\xB1\xE6\xEA\xA3\xF1\xF3\xB6\xBC\xBF". // ISO 8859-2
"\xB9\x9C\x9F", // win 1250
"ABCDEFGHIJKLMNOPQRSTUVWXYZ".
"\xA1\xC6\xCA\xB3\xD1\xD3\xA6\xAC\xAF". // ISO 8859-2
"\xA5\x8C\x8F" // win 1250
);
}