Re[2]: [PHP-DEV] Bug #6173: urlencode() doesn't respect locale

From: Date: Tue, 15 Aug 2000 17:23:46 +0000
Subject: Re[2]: [PHP-DEV] Bug #6173: urlencode() doesn't respect locale
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-29015@lists.php.net to get a copy of this message
Hello Joey, Tuesday, August 15, 2000, 8:33:54 PM, you wrote: JS> Hmm... JS> I'm not sure that this is a bug. JS> RFC 1738 says: JS> URLs are written only with the graphic printable JS> characters of the US-ASCII coded character set. JS> I realize that urlencode() is not RFC 1738 directly, JS> but still... You see, the problem is twofold. First - it's highly practical. I've encountered it in phpMyAdmin. Problem being, that it uses redirection and GET method to transmit string values between frames and screens. Therefore, significant string values get passed through the URL. Because of several codepage per language situation, about half of all Apache-based webservers in Russia (and not only in Russia), use so-called Russian apache which translates content between codepages based on server and client charset settings. I won't get any deeper so as not to confuse people not really interested, but if I'm not able to leave characters in <a href> unencoded, I get significant problems. Second - I do not consider myself a guru, but looking at the actual implementation of php3_urlencode(), I feel it should be respecting locale settings, but it doesn't. I would think that in case no actual immediate error is found in the implementation, creating a separate urlencode function for nonUS people would be very nice (locale_urlencode() or whatever). For the time being, I can manage by replacing a call to urlencode() with a single-line regex call. -- Best regards, Michael mailto:mbravo@tag-ltd.spb.ru

« previous php.dev (#29015) next »