Skip to content

Commit

Permalink
fixed #10 by providing support for the multibyte strings
Browse files Browse the repository at this point in the history
  • Loading branch information
franzose committed Jul 15, 2020
1 parent e32f4e5 commit 4f9cd45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
}
],
"require": {
"ext-mbstring": "*",
"php-smpp/php-smpp": "1.2",
"illuminate/support": "^5|^6|^7"
},
Expand Down
2 changes: 1 addition & 1 deletion src/SmppService.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ protected function getSmppAddress($phone = null)
*/
protected function sendSms(SmppAddress $sender, $recipient, $message)
{
$message = iconv('UTF-8', 'UCS-2', $message);
$message = mb_convert_encoding($message, 'UCS-2', 'utf8');

return $this->smpp->sendSMS($sender, $this->getRecipient($recipient), $message, null, SMPP::DATA_CODING_UCS2);
}
Expand Down

0 comments on commit 4f9cd45

Please sign in to comment.