ID:               19795
 Comment by:       larry at kamsha dot ru
 Reported By:      doc at nitramlexa dot com
 Status:           Closed
 Bug Type:         Strings related
 Operating System: FreeBSD 4.6
 PHP Version:      4.2.2
 New Comment:

I have PHP 5.0.0 release with same bug (with cyrillic characters). I've
analized sources and found out that comparison is made on "char" values.
So all extended characters (with hi-order bit 1) treated as negative.
Changing "char" to "unsigned char" would place national characters
after english characters (greater in terms of compare), that is
correct, but locale-specific collation problem will remain. This is not
important for CP1251 or CP866 cyrillic encodings, because theese already
have characters sorted by values correctly. But there will be problem
for KOI8-R encoding (for which this is not the case).
The problem can be easily solved by using "strcoll" (in place of dumb
value compare), I guess.


Previous Comments:
------------------------------------------------------------------------

[2004-07-16 04:32:57] mbp at sourcefrog dot net

This bug does seem to still be present in php5 CVS.  The comparison is
simply by byte values, not taking character set or locale into account.

------------------------------------------------------------------------

[2004-06-28 14:55:26] mikael at chl dot chalmers dot se

This bug seems to have popped back again in version 4.3.7

When using setlocale(LC_ALL, 'sv_SE') the national chars והצ get sorted
before other international chars, they should appear at the bottom.

------------------------------------------------------------------------

[2003-04-16 16:11:22] [EMAIL PROTECTED]

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.



------------------------------------------------------------------------

[2003-01-27 16:11:34] kamikaze at yifan dot net

I have the same problem, with זרו. strtoupper() does, for example, not
uppercase those letters.

Also i 4.2.3

------------------------------------------------------------------------

[2002-11-10 18:21:28] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.



------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/19795

-- 
Edit this bug report at http://bugs.php.net/?id=19795&edit=1

Reply via email to