Re: cvs: php-src(PHP_4_3) / NEWS /ext/standard string.c /main rfc1867.c
| From: | Ilia Alshanetsky | Date: | Fri, 21 Jan 2005 16:12:21 +0000 |
| Subject: | Re: cvs: php-src(PHP_4_3) / NEWS /ext/standard string.c /main rfc1867.c | ||
| References: | 1 2 3 4 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-30062@lists.php.net to get a copy of this message | ||
Moriyoshi Koizumi wrote:
> What is really confusing around this stuff, is that php_basename() is
> all but designed to work on the filesystem where the script is running,
> while the filename coming from the outside isn't necessarily given in
> the same scheme. For example, php_basename() is unlikely to handle a
> filename encoded in a different encoding than the system's. In fact,
> '¥¥' (0x5c) appears in the second byte of a Shift_JIS sequence, which
> is the most commonly used multibyte encoding in Japan.
Well, there are several problems with this. On a *NIX system it is
perfectly valid to have a file name with ¥ characters in it. They cause
no problems for the system or the upload code. However, if things like
s = strrchr(filename, '¥¥'); are done the filename is trimmed. In
addition that older variant of the code would still have problem with
multibyte languages unless mbstring extension was compiled & enabled.
Ilia