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

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to