I have a text file with accented characters like é. I used File Encoding Checker, it appears that the file is encoded as windows-1252. I read the file with the following JS and node.js code:
fs.readFile('frenchVerbsList.txt','utf-8', function(err, data) { if (err) { return console.log("ERROR here!: " + err); } frenchWords = data.split('\r\n'); console.log(frenchWords); }); The output from the console.log statement shows a question mark instead of the accented characters. What has happened?