Bug #6173: urlencode() doesn't respect locale

From: Date: Tue, 15 Aug 2000 16:21:15 +0000
Subject: Bug #6173: urlencode() doesn't respect locale
Groups: php.dev 
Request: Send a blank email to php-dev+get-28994@lists.php.net to get a copy of this message
From: mbravo@acm.org Operating system: FreeBSD 4.1 PHP version: 3.0.16 PHP Bug Type: Misbehaving function Bug description: urlencode() doesn't respect locale By definition, urlencode() should leave alphanumeric characters unencoded. However, (uin my case) it doesn't respect locale settings, and encodes non-ASCII (but alphanumeric as per locale definition) characters when it shouldn't. Locale is correctly set up, and Apache does have correct LANG and LC_ALL environment variables in its runtime environment (checked by phpinfo()). I even tried executing explicit setlocale() call within a script but this doesn't change anything (which is probably correct as locale is already set systemwide) I don't know if this problem is peculiar to FreeBSD installations, perhaps someone should check this out - might be possible, since judging by source code, system isalphanum() is used to determine whether a character should be encoded. However, FreeBSD in general handles locale very responsibly and this wouldn't be possible if fundamental checks like isalpha() were broken.

« previous php.dev (#28994) next »