Skip to content

Commit

Permalink
Merge pull request #11 from franzose/1.3
Browse files Browse the repository at this point in the history
fixed #10 by providing support for the multibyte strings
  • Loading branch information
franzose authored Jul 15, 2020
2 parents 9814728 + 4f9cd45 commit 78240e2
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 78240e2

Please sign in to comment.