ID: 27668
Updated by: [EMAIL PROTECTED]
Reported By: amd at tt dot ee
-Status: Open
+Status: Bogus
Bug Type: *Languages/Translation
Operating System: Gentoo Linux
PHP Version: 4.3.4
New Comment:
This is not a bug in PHP as PHP uses the OS functions to determine
wheather something is an alpha character or not. Also, this has nothing
to do with character sets at all, it's just the locale that matters. Do
you actually have the et_EE locale installed? Anyway, this is not a bug
in PHP.
Previous Comments:
------------------------------------------------------------------------
[2004-03-24 02:11:25] amd at tt dot ee
Description:
------------
ctype_alpha fails to identify at least two iso-8859-15 characters:
s-caron (�) and z-caron (�) and their upper-case equivalents.
Reproduce code:
---------------
<?php
setlocale(LC_ALL,'et_EE');
header("Content-Type: text/html; charset=iso-8859-15;");
$strings = array('���aa','sete','a�ew', 'a�e','����','te�t','�ombie');
foreach ($strings as $testcase) {
if (ctype_alpha($testcase)) {
echo "Alpha test - $testcase - PASSED.<br />\n";
} else {
echo "Alpha test - $testcase - FAILED.<br />\n";
}
}
?>
Expected result:
----------------
Alpha test - ���aa - PASSED.
Alpha test - sete - PASSED.
Alpha test - a�ew - PASSED.
Alpha test - a�e - PASSED.
Alpha test - ���� - PASSED.
Alpha test - te�t - PASSED.
Alpha test - �ombie - PASSED.
Actual result:
--------------
Alpha test - ���aa - PASSED.
Alpha test - sete - PASSED.
Alpha test - a�ew - FAILED.
Alpha test - a�e - FAILED.
Alpha test - ���� - PASSED.
Alpha test - te�t - FAILED.
Alpha test - �ombie - FAILED.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27668&edit=1