Skip to content

Commit 78240e2

Browse files
authored
Merge pull request #11 from franzose/1.3
fixed #10 by providing support for the multibyte strings
2 parents 9814728 + 4f9cd45 commit 78240e2

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
}
1010
],
1111
"require": {
12+
"ext-mbstring": "*",
1213
"php-smpp/php-smpp": "1.2",
1314
"illuminate/support": "^5|^6|^7"
1415
},

src/SmppService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ protected function getSmppAddress($phone = null)
224224
*/
225225
protected function sendSms(SmppAddress $sender, $recipient, $message)
226226
{
227-
$message = iconv('UTF-8', 'UCS-2', $message);
227+
$message = mb_convert_encoding($message, 'UCS-2', 'utf8');
228228

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

0 commit comments

Comments
 (0)