我无法让 £ 符号在标题标签中正确呈现。
我试过使用 £ 出来的?在钻石中。我也试过:
£
但这就是原样。
我也尝试过设置:
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;
}