From ed11e789d2c13661729ea142f8d94c84587dd239 Mon Sep 17 00:00:00 2001 From: Alioth Date: Sun, 1 Nov 2020 00:53:22 +0800 Subject: [PATCH] support the buffer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit eg: say.speak(require('iconv-lite').encode('测试一下', 'gbk'), null, 1); --- platform/win32.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/win32.js b/platform/win32.js index c8715d9..cd4342a 100644 --- a/platform/win32.js +++ b/platform/win32.js @@ -29,7 +29,7 @@ class SayPlatformWin32 extends SayPlatformBase { psCommand += `$speak.Speak([Console]::In.ReadToEnd())` - pipedData += text + pipedData = text args.push(psCommand) options.shell = true @@ -59,7 +59,7 @@ class SayPlatformWin32 extends SayPlatformBase { psCommand += `$speak.Speak([Console]::In.ReadToEnd());$speak.Dispose()` - pipedData += text + pipedData = text args.push(psCommand) options.shell = true