support encoding for xtemplate on nodejs.Update #566