#15706 [Ana->Csd]: readdir doesn't return correct FRENCH filenames
| From: | sfox@php.net | Date: | Sat, 17 Aug 2002 05:03:28 +0000 |
| Subject: | #15706 [Ana->Csd]: readdir doesn't return correct FRENCH filenames | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-17082@lists.php.net to get a copy of this message | ||
ID: 15706
Updated by: sfox@php.net
Reported By: musallam@sympatico.ca
-Status: Analyzed
+Status: Closed
Bug Type: Directory function related
Operating System: WIN XP
PHP Version: 4.1.1
New Comment:
No feedback and the thing works now on XP at least, so I'm closing this
bug down.
Previous Comments:
------------------------------------------------------------------------
[2002-08-06 19:39:44] sfox@php.net
OK, for full strangeness try doing that readdir() with the current CVS
version of PHP. Suddenly this week it started working on XP as it
should (but not on win9x or ME, where it shouldn't, due to the
aforementioned single byte char encoding).
I'm still waiting to get test results from people with NT/w2k too, but
if it works there I'm closing this bug report, as there's no way to
differentiate between different flavours of Windows. Probably marked
'magic worked here'... although actually I suspect that Rui fixed it in
4.2 and something overrode that fix in the interim.
Feedback would be useful at this point :)
------------------------------------------------------------------------
[2002-08-05 08:29:59] sfox@php.net
I just spent some days playing with this one before coming to the
conclusion that it's not a PHP bug *as such*, more to do with MS
character types not being ANSI-compatible. The PHP directory functions
for win32 use MS functions which return MS-defined char types (as
opposed to the PHP string functions, which don't touch MS and which
work fine :). We use those to set up win32 directory functions in a
way that is as nearly as possible compatible with unix-flavoured
systems, and the returned char type is then used throughout the
universal directory functions.
Unfortunately 'char' in this instance means 'single byte'.
Fixing the win32 dir functions within PHP to make it possible for other
MS char types to be used would mean that the wrong type is returned to
the PHP directory functions used by all systems. It appears that the
only way to internationalise PHP in this area would be to separate out
the win32 directory functions completely ..
I'm not happy with the politics of this, particularly given the
widespread use of dir and file names within PHP source (think of
streams, etc). If anyone can think of a better way to implement dirent
for win32, please do!
------------------------------------------------------------------------
[2002-07-14 17:54:10] sniper@php.net
Does this happen if you run the same code fragment
on command line?
------------------------------------------------------------------------
[2002-07-14 10:46:22] nohn@php.net
On the Web you should always use 7-Bit ASCII (no german umlauts or
these daft french characters or whatever is no "standard")
------------------------------------------------------------------------
[2002-02-25 17:50:57] musallam@sympatico.ca
I'm not sure either, but fact remains, the letters returned have either
a wrong encoding or wrong string conversion...
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/15706
--
Edit this bug report at http://bugs.php.net/?id=15706&edit=1