0
我无法使英镑符号在标题标记中正确显示。动态生成标题标记中的英镑符号
我试过使用英镑出来作为一个?在钻石中。我也尝试过:
£
但是这样出来。
我也曾尝试设置:
header('Content-Type: text/html; charset=utf-8');
之前的输出是呼应。
这里是我正在生成标题标签的内容:
public function marginAttribution($enquiryId)
{
$data = $this->model->marginAttribution($enquiryId) ;
$output = '';
$output .= 'Sales value (parts): '.$data['sellingCurrency'].number_format($data['sellingValueNative'], 2, '.', ',')."\n";
$output .= 'Sales value (fees): '.$data['sellingCurrency'].number_format($data['sellingFees'], 2, '.', ',')."\n";
$output .= 'Sales value total ('.$data['sellingCurrency'].'): '.$data['sellingCurrency'].number_format($data['sellingFees']+$data['sellingValueNative'], 2, '.', ',')."\n";
$output .= "Sales value total (£): £".number_format(($data['sellingFees']+$data['sellingValueNative'])/$data['sellingCurrencyRate'], 2, '.', ',')."\n";
header('Content-Type: text/html; charset=utf-8');
echo $output;
}
[在Web应用程序中处理Unicode前后](http://kunststube.net/frontback/) – deceze 2013-03-02 12:52:03
@deceze我的数据库设置为utf-8,页面编码也设置为html5版本的标记,我试图在涉及的脚本中使用header()函数。还没有运气。 – imperium2335 2013-03-02 13:02:25
您的文件*是否以UTF-8编码? – deceze 2013-03-02 13:03:30