字符串在第一个重音字符后停止显示


String stops displaying after 1st accentued character

**Laravel 4 beta 3:问题

字符串在第一个重音字符后停止显示。**

我有一个DB表,我在其中存储DVD条目(标题、导演…(

DB是utf_8,标题的排序规则是utf8_unicode_ci

database.php配置文件指示utf8_unicode_ci。。。。。。。在模型中(扩展Eloquent(:

class Dvdentry extends Eloquent {
public $table = 'dvd_entry';
public $timestamps = false;
}

在控制器中:

  $entries=Dvdentry::where($field,'like',$ulike)->get();

视图中:

 @foreach($entries as $entry)
    <a href={{$entry->imdb_link}} page=_blank>{{$entry->title}}</a>

它应该显示一个标题列表。对于带有重音的标题(即Mépris(Le((,只有M是

显示。我尝试过,但没有成功:

 {{{$entry->title}}}
 <?php echo $entry->title; ?>
 <?php echo utf_decode($entry->title); ?>

任何线索。请求帮助。

您尝试过e((助手吗?

e((-在给定字符串上运行htmlentites,支持UTF-8。

$entities = e('<html>foo</html>');

此时请查看Laravel文档:http://laravel.com/docs/helpers#strings

我还推测这些口音会导致Blade失败。在保存到数据库之前,请尝试对标题进行编码。因此重音是用HTML实体-hellip;

Mépris => M&eacute;pris