PHP bugs in Turkish locale

php.internals

Tomas Kuliavas

19 years ago
Hi, Maybe somebody could provide good explanation why you can fix the issue (http://bugs.php.net/bug.php?id=42526). You can't claim that locale insensitive tolower() breaks things, because your functions are locale insensitive in some setups. Now I can only see that PHP developers close bug reports as "bogus" or "won't fix" without any good explanation. I think I've already said on this list once. If you lie in order to prove your point, you lose. You don't need PHP6 in order to fix it. Fix is possible or I don't see whole picture.
-- Tomas

Jani Taskinen

19 years ago
You are free to send a patch.. :) If you have objections, please add comment to the report marked as "Wont fix" and don't spam the already huge database with one more report about same issue. --Jani On Mon, 2007-09-03 at 14:16 +0300, Tomas Kuliavas wrote:
> Hi, > > Maybe somebody could provide good explanation why you can fix the issue > (http://bugs.php.net/bug.php?id=42526). You can't claim that locale > insensitive tolower() breaks things, because your functions are locale > insensitive in some setups. > > Now I can only see that PHP developers close bug reports as "bogus" or > "won't fix" without any good explanation. I think I've already said on > this list once. If you lie in order to prove your point, you lose. You > don't need PHP6 in order to fix it. Fix is possible or I don't see whole > picture. > > -- > Tomas >
-- Make me happy: http://pecl.php.net/wishlist.php/jani

Tomas Kuliavas

19 years ago
I'll add comments on 35050 and you will ignore it, because bug is not open. You have patch on http://bugs.php.net/bug.php?id=35583. I understand why it might have been rejected. Using mapping table to lowercase ascii is not optimal solution. I have other patch, but you are not free to use code licensed under GPL. I am not C programmer and this patch uses code taken from program licensed under GPL. I've noticed one change. strcasecmp() is no longer locale aware. PHP does not have regression test for 19795 bug or this test depends on locale that is not available on my machine. strtolower(), strtoupper() and stristr() are still locale aware. Currently I am not testing other string functions.

Tomas Kuliavas

19 years ago
I can't add comments on that bug report. http://www.topolis.lt/php/#35050 Here comes the patch. Only strcasecmp results are affected. I suspect that PHP scripts and interpreter itself use same strcasecmp function.

Jani Taskinen

19 years ago
I added a note about this. I'm not going to commit the patch, that's for someone else to decide.. --Jani On Thu, 2007-09-06 at 13:39 +0300, Tomas Kuliavas wrote:
> I can't add comments on that bug report. > > http://www.topolis.lt/php/#35050 > > Here comes the patch. Only strcasecmp results are affected. I suspect that > PHP scripts and interpreter itself use same strcasecmp function. > > > You are free to send a patch.. :) > > > > If you have objections, please add comment to the report marked as "Wont > > fix" and don't spam the already huge database with one more report about > > same issue. > > > > --Jani > > > > > > On Mon, 2007-09-03 at 14:16 +0300, Tomas Kuliavas wrote: > >> Hi, > >> > >> Maybe somebody could provide good explanation why you can fix the issue > >> (http://bugs.php.net/bug.php?id=42526). You can't claim that locale > >> insensitive tolower() breaks things, because your functions are locale > >> insensitive in some setups. > >> > >> Now I can only see that PHP developers close bug reports as "bogus" or > >> "won't fix" without any good explanation. I think I've already said on > >> this list once. If you lie in order to prove your point, you lose. You > >> don't need PHP6 in order to fix it. Fix is possible or I don't see whole > >> picture. > >> > >> -- > >> Tomas > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
-- Patches/Donations: http://pecl.php.net/~jani/

Marcus Börger

18 years ago
Hello Tomas, when developing a patch like this, it is more readable to do typical min max notation to ease readability. That is change: if (91 > i && i > 64) { To: if (64 < i && i < 91) { the real issue here is that if we fix it this way we break other locales. marcus Thursday, September 6, 2007, 12:39:37 PM, you wrote:
> I can't add comments on that bug report.
> http://www.topolis.lt/php/#35050
> Here comes the patch. Only strcasecmp results are affected. I suspect that > PHP scripts and interpreter itself use same strcasecmp function.
>> You are free to send a patch.. >> >> If you have objections, please add comment to the report marked as "Wont >> fix" and don't spam the already huge database with one more report about >> same issue. >> >> --Jani >> >> >> On Mon, 2007-09-03 at 14:16 +0300, Tomas Kuliavas wrote: >>> Hi, >>> >>> Maybe somebody could provide good explanation why you can fix the issue >>> (http://bugs.php.net/bug.php?id=42526). You can't claim that locale >>> insensitive tolower() breaks things, because your functions are locale >>> insensitive in some setups. >>> >>> Now I can only see that PHP developers close bug reports as "bogus" or >>> "won't fix" without any good explanation. I think I've already said on >>> this list once. If you lie in order to prove your point, you lose. You >>> don't need PHP6 in order to fix it. Fix is possible or I don't see whole >>> picture. >>> >>> -- >>> Tomas
Best regards, Marcus

Tomas Kuliavas

18 years ago
> when developing a patch like this, it is more readable to do typical > min max notation to ease readability. That is change: > if (91 > i && i > 64) { > To: > if (64 < i && i < 91) { > > the real issue here is that if we fix it this way we break other locales.
How they break? Do you want to support case insensitive 8bit method and class names in other locales? If fix breaks other locales, then you are already breaking them on Windows with _tolower_l() function. My test shows that only strcasecmp is affected. Other PHP case insensitive string functions remain LC_CTYPE aware.
-- Tomas