'this.write' also needs if (typeof(input) === 'string') input = new Buffer(input);

I tryed 'res.pipe(iconv).pipe(res)'.
Its argument is string type.