我无法在标题标记中正确呈现£符号。
我试过使用£作为一个?钻石。我也尝试过:
£
但是按原样出现。
我也尝试过设置:
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;
}