setEncoding is a function, not a property. Secondly, node.js doesn't know what "utf-8" is, but it knows what "utf8" is. Furthermore "utf8" is the default, so this line is pointless and should be removed.