From 9e31a606d10a3b34e8b236637f01b3257e786ed0 Mon Sep 17 00:00:00 2001 From: Jackwaterveg <87408988+Jackwaterveg@users.noreply.github.com> Date: Mon, 13 Dec 2021 14:46:20 +0800 Subject: [PATCH] set default encoding utf8 for win (#1101) Co-authored-by: KP <109694228@qq.com> --- paddlespeech/cli/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/paddlespeech/cli/__init__.py b/paddlespeech/cli/__init__.py index 99a53c37..c82168ae 100644 --- a/paddlespeech/cli/__init__.py +++ b/paddlespeech/cli/__init__.py @@ -11,9 +11,13 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + +import _locale from .asr import ASRExecutor from .base_commands import BaseCommand from .base_commands import HelpCommand from .cls import CLSExecutor from .st import STExecutor from .tts import TTSExecutor + +_locale._getdefaultlocale = (lambda *args: ['en_US', 'utf8'])