Date: 08/15/00
- Next message: Bug Database: "[PHP-DEV] PHP 4.0 Bug #6174 Updated: problem with sprintf, urlencode and string concatenation"
- Previous message: johnw <email protected>: "[PHP-DEV] PHP 4.0 Bug #6174: problem with sprintf, urlencode and string concatenation"
- In reply to: mbravo <email protected>: "[PHP-DEV] Bug #6173: urlencode() doesn't respect locale"
- Next in thread: Michael Bravo: "Re[2]: [PHP-DEV] Bug #6173: urlencode() doesn't respect locale"
- Reply: Michael Bravo: "Re[2]: [PHP-DEV] Bug #6173: urlencode() doesn't respect locale"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hmm...
I'm not sure that this is a bug.
RFC 1738 says:
URLs are written only with the graphic printable
characters of the US-ASCII coded character set.
I realize that urlencode() is not RFC 1738 directly,
but still...
On 15 Aug 2000, mbravo <email protected> wrote the following to php-dev <email protected> :
> From: mbravo <email protected>
> 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.
>
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Bug Database: "[PHP-DEV] PHP 4.0 Bug #6174 Updated: problem with sprintf, urlencode and string concatenation"
- Previous message: johnw <email protected>: "[PHP-DEV] PHP 4.0 Bug #6174: problem with sprintf, urlencode and string concatenation"
- In reply to: mbravo <email protected>: "[PHP-DEV] Bug #6173: urlencode() doesn't respect locale"
- Next in thread: Michael Bravo: "Re[2]: [PHP-DEV] Bug #6173: urlencode() doesn't respect locale"
- Reply: Michael Bravo: "Re[2]: [PHP-DEV] Bug #6173: urlencode() doesn't respect locale"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

