cvs: php-src(PHP_4_3) /ext/standard soundex.c
| From: | Ilia Alshanetsky | Date: | Thu, 17 Jun 2004 00:17:52 +0000 |
| Subject: | cvs: php-src(PHP_4_3) /ext/standard soundex.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-27638@lists.php.net to get a copy of this message | ||
iliaa Wed Jun 16 20:17:52 2004 EDT
Modified files: (Branch: PHP_4_3)
/php-src/ext/standard soundex.c
Log:
MFH: Properly handly high ascii values in soundex().
http://cvs.php.net/diff.php/php-src/ext/standard/soundex.c?r1=1.20.8.1&r2=1.20.8.2&ty=u
Index: php-src/ext/standard/soundex.c
diff -u php-src/ext/standard/soundex.c:1.20.8.1 php-src/ext/standard/soundex.c:1.20.8.2
--- php-src/ext/standard/soundex.c:1.20.8.1 Tue Dec 31 11:35:34 2002
+++ php-src/ext/standard/soundex.c Wed Jun 16 20:17:52 2004
@@ -15,7 +15,7 @@
| Author: Bjørn Borud - Guardian Networks AS <borud@guardian.no> |
+----------------------------------------------------------------------+
*/
-/* $Id: soundex.c,v 1.20.8.1 2002/12/31 16:35:34 sebastian Exp $ */
+/* $Id: soundex.c,v 1.20.8.2 2004/06/17 00:17:52 iliaa Exp $ */
#include "php.h"
#include <stdlib.h>
@@ -74,7 +74,7 @@
/* BUG: should also map here accented letters used in non */
/* English words or names (also found in English text!): */
/* esstsett, thorn, n-tilde, c-cedilla, s-caron, ... */
- code = toupper(str[i]);
+ code = toupper((int)(unsigned char)str[i]);
if (code >= 'A' && code <= 'Z') {
if (_small == 0) {
/* remember first valid char */