Webサイトからデータをスクレイピングしました。このデータはデータベースに配置されます。データを印刷すると:
print $row->description;
次のようになります。
• Shoot great photos in low light with bright lens•
以前は、次を追加することでこれを修正できました。
header('Content-Type: text/html; charset=UTF-8');
mb_internal_encoding('UTF-8');
これをYIIのindex.phpに追加してみましたが、出力は変わりません。私も試しました:
$decoded = utf8_decode($row->description);
print $decoded;
しかし、私は得る:
�?� Shoot great photos in low light with bright lens�?�
これを YII で動作させるにはどうすればよいですか?