Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to read Chinese? #120

Open
wangrongding opened this issue Jun 10, 2021 · 6 comments
Open

How to read Chinese? #120

wangrongding opened this issue Jun 10, 2021 · 6 comments

Comments

@wangrongding
Copy link

Reading Chinese will be garbled

@wangrongding
Copy link
Author

eg. 我想吃饭 -> %E6%88%91%E6%83%B3%E5%90%83%E9%A5%AD

@loicpirez
Copy link

Works fine for me.

const say = require('say')
say.export("出租汽车", 'Ting-Ting', 1, 'taxi.wav', (err) => {
  if (err) {
    return console.error(err)
  }

  console.log('Text has been saved to taxi.wav.')
})

@silence19
Copy link

Hi guys, I have found a solution for Chinese, please check this if you like.

@Kayakyx
Copy link

Kayakyx commented May 28, 2022

On Windows you need to change the terminal encoding to UTF8.

  1. Run chcp on the terminal to see the current encoding.
  2. Run chcp 65001 to change the encoding to UTF8.
    Then re-execute the JS file.

Example:
chcp 65001 && node demo.js

@silence19
Copy link

On Windows you need to change the terminal encoding to UTF8.

  1. Run chcp on the terminal to see the current encoding.
  2. Run chcp 65001 to change the encoding to UTF8.
    Then re-execute the JS file.

Example: chcp 65001 && node demo.js

Sorry, I am not sure, the say.js is embeded in the plugin I needed, so that it will always reset to chcp 936 when running. I'll see if I can make it work in this way.

@zld150
Copy link

zld150 commented Jan 13, 2023

Thanks!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants