#27668 [NEW]: ctype_alpha fails to identify some characters
| From: | amd at tt dot ee | Date: | Wed, 24 Mar 2004 07:11:25 +0000 |
| Subject: | #27668 [NEW]: ctype_alpha fails to identify some characters | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-56742@lists.php.net to get a copy of this message | ||
From: amd at tt dot ee
Operating system: Gentoo Linux
PHP version: 4.3.4
PHP Bug Type: *Languages/Translation
Bug description: ctype_alpha fails to identify some characters
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','aew',
'ae','üõüä','tet','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 - aew - PASSED.
Alpha test - ae - PASSED.
Alpha test - üõüä - PASSED.
Alpha test - tet - PASSED.
Alpha test - ombie - PASSED.
Actual result:
--------------
Alpha test - äöäaa - PASSED.
Alpha test - sete - PASSED.
Alpha test - aew - FAILED.
Alpha test - ae - FAILED.
Alpha test - üõüä - PASSED.
Alpha test - tet - FAILED.
Alpha test - ombie - FAILED.
--
Edit bug report at http://bugs.php.net/?id=27668&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27668&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27668&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=27668&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=27668&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=27668&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=27668&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=27668&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=27668&r=support
Expected behavior: http://bugs.php.net/fix.php?id=27668&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=27668&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=27668&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=27668&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27668&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=27668&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=27668&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=27668&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27668&r=float