Skip to content

Commit

Permalink
Merge pull request #1 from DenisChinin/master
Browse files Browse the repository at this point in the history
#2 Replace 'gtk' encoding with encoding from settings
  • Loading branch information
pavelpower committed Dec 2, 2014
2 parents ff9b5e6 + f5151ac commit b872d67
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ftl.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,13 @@ var processTemplate = function(args) {
]);

cmd.stdout.on('data', function(data) {
// args.callback(null, iconv.decode(data, 'gbk'));
resultData += iconv.decode(data, 'gbk');
resultData += iconv.decode(data, args.settings.encoding);
stream.emit('data', resultData);
});

cmd.stderr.on('data', function(data) {
// Print error message
console.log(iconv.decode(data, 'gbk'));
console.log(iconv.decode(data, args.settings.encoding));
});

cmd.stdout.on('end', function(err) {
Expand Down

0 comments on commit b872d67

Please sign in to comment.