Nexmo / nexmo-laravel

Add Vonage functionality such as SMS and voice calling to your Laravel app with this Laravel Service Provider.
MIT License
318 stars 79 forks source link

message is garbled #5

Closed ha-family closed 6 years ago

ha-family commented 7 years ago

hi, i have an issue while i was sending message i've got garbled message in chinese, how to set nexmo message type to unicode???

thank you

tjlytle commented 7 years ago

You'll need to set the type to unicode for now. See this thread: https://github.com/Nexmo/nexmo-php/issues/8

ha-family commented 7 years ago

thanks for your reply, but i use Notifications in Laravel, the way i was used is follow the document like below and i don't know how to add type => 'unicode' into it... could you help me? thanks.

public function toNexmo($notifiable)
{
        return (new NexmoMessage)->content('Chinese Message here.....');
}
tjlytle commented 7 years ago

@liu-yuhuan Sorry for letting this drop. You'd have to create another unicode delivery channel. However, the related issue references code that autodetects and selects unicode if needed. I may update the library with that support, then it would out of the box.

isaacesso commented 7 years ago

@liu-yuhuan here is how to set unicode type with laravel notifications:

public function toNexmo($notifiable)
{
    return (new NexmoMessage)->unicode()->content('Chinese Message here.....');
}
mheap commented 6 years ago

Thanks for the assist @isaacesso