diff --git a/composer.json b/composer.json index f1e6998..2bf31a8 100644 --- a/composer.json +++ b/composer.json @@ -9,6 +9,7 @@ } ], "require": { + "ext-mbstring": "*", "php-smpp/php-smpp": "1.2", "illuminate/support": "^5|^6|^7" }, diff --git a/src/SmppService.php b/src/SmppService.php index f0a3309..b44dfe7 100644 --- a/src/SmppService.php +++ b/src/SmppService.php @@ -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); }