node-readlines icon indicating copy to clipboard operation
node-readlines copied to clipboard

First character is undefined

Open haltman74 opened this issue 3 years ago • 0 comments

Hi everybody, I read a log file with the following code:

const liner = new lineByLine(file_name); let valore ="<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n<Table>\n<Row><Cell>Contenuto log</Cell></Row>\n"; let l; while (line = liner.next()) { console.log(""+line); l+=""+line+"&lt;br\&gt;"; } valore+="\t<Row><Cell>"+htencode.encode(l, {mode: 'extensive', level: 'xml'})+"</Cell></Row>\n"; valore+="</Table>"; callback(null, valore); immagine

I get the first character undefined can you explain to me why?

haltman74 avatar Jun 07 '21 15:06 haltman74