-
Notifications
You must be signed in to change notification settings - Fork 7.3k
unable to deal with file names that have invalid encoding #8619
Comments
Can you provide a use case for this issue? |
The use case seems readily apparent, as described in andrewrk/groovebasin#383. If ordinary processes can deal with these (badly-encoded) filenames, Node should be able to as well. If the problem is JS strings' weird semi-broken character encoding and a desire to not change locked APIs, then perhaps Node could be converted to use Buffers with an encoding type of |
try using the results of readdir. I'll piece together an example, just a moment... |
|
I ran this with the 0.12 branch on OS X and got, what appears to be, correct output (see below). Can you try with more recent code?
|
I have a sneaking suspicion that this is related to #2387 -- the age old problem of JS strings being in UCS2, but the filesystem being in ISO-8859-1, or some other encoding. |
Looks like a duplicate issue indeed. I would like to point out that this is a huge shortcoming in Node.js and should be fixed before 1.0 if Node.js wants to be taken seriously. With this issue, Node.js is fundamentally unsuitable for dealing with users' files. |
Closing this issue in favor of #2387. |
There is a file in my user's file system and Node.js cannot use any of the fs API on it, because the file name has an invalid encoding. File names are byte arrays; not strings. This is the root of the problem.
How should I solve this problem? Is this a limitation of Node.js, that it cannot deal with file names with invalid encodings?
andrewrk/groovebasin#383
The text was updated successfully, but these errors were encountered: