mikaelbr / node-notifier

A Node.js module for sending notifications on native Mac, Windows and Linux (or Growl as fallback)
MIT License
5.73k stars 322 forks source link

Chinese Support? #344

Closed JasonkayZK closed 10 months ago

JasonkayZK commented 3 years ago

How to support chinese nitification? I found it wrong when i write someting like this:

    notifier.notify(
        {
            title: '大家好',
            message: '放假休息重要通知',
            icon: path.join(__dirname, 'clock.ico'),
            sound: true,
        },
    );

And the result it pretty ugly like this: 1602646752(1)

So i was wondering how can i change the encoding when send notifications. Thanks!

mikaelbr commented 3 years ago

Hi! This looks like an issue with the encoding snoretoast itself. Does it work if you use it directly manually through the command line?

JasonkayZK commented 3 years ago

It's weird! Somehow it works with pure snoretoast-cli! 1603417592

felixhao28 commented 3 years ago

Chinese displays fine on my computer. Maybe you can try saving the js source file in UTF-8 encoding?

JasonkayZK commented 3 years ago

It's weird, because the js file is already in UTF-8 encoding!

a958330481 commented 1 year ago

Does actions support Chinese? like this:

notifier.notify(
    {
        title: "任务结束",
        message: "是否开始休息?",
        sound: true,
        actions: ["确认", "取消"],
    },
    (error, response, metadata) => {
        console.log(response, metadata);
    }
);