I get some data from a .txt with a function fs.readFile(), but the top of the content is like "Alex libman"
All my code;
fs.readFile(__dirname+"/txts/generate/titles0.txt", "utf-8", function (ex, titles) {
var titlesArr = titles.split("\r\n");
console.log(titlesArr);
});
Result
["?Alex libman","Kroya Barzo","Deliah Krbo"]
Always, there is a question mark at the top of the content
Note: my titles0.txt is string data
source
share