Skip to content Skip to sidebar Skip to footer

Special Characters In Node.js Readdir()

I'm running this piece of code in node.js in order to see the files in a directory an to see the stats for them: var getFiles = function (dir, done) { fs.readdir(dir, function

Solution 1:

I think that the problem is that Windows encodes filenames as ISO-whatever but node reads them as utf8. Try using iconv to convert from iso to utf8.


Post a Comment for "Special Characters In Node.js Readdir()"