alexwhitman / node-pushbullet-api

PushBullet API module for Node.js
165 stars 36 forks source link

chinese display error #26

Closed aperson2013 closed 7 years ago

aperson2013 commented 7 years ago

when i push chinese like "sddf 好发挥科技交流 ddd", but get "sddf 好ddd" from the pushes

alexwhitman commented 7 years ago

What was the problem in the end, did you solve it?

aperson2013 commented 7 years ago

I thought i have solved it by call decodeURIComponent(), but when i changed the code to another server. It displayed error again.

aperson2013 commented 7 years ago

i solve this problem

  1. use decodeURIComponent() when the push.body contains non-ascii char
  2. change system LANG variable
    sudo vim /etc/default/locale
    LANG="en_US.UTF-8"
    LANGUAGE="en_US:en"