Twilio短信在英语中运行良好,但法语口音不起作用。重音字符被替换为?标志。我该怎么办?
答案 0 :(得分:2)
我发现将身体转换为UTF-8纠正了这个问题,实际上将价格降低了一半。不同之处在于我需要utf8_encode
身体,如下所示:
<?php
// Step 3: instantiate a new Twilio Rest Client
$client = new Services_Twilio($AccountSid, $AuthToken);
$phone = $_REQUEST['phone'];
$msg = utf8_encode ( $_REQUEST['msg']);
$sms = $client->account->messages->sendMessage("xxx-xxx-xxxx", $phone, $msg);