Laravel Blade显示特殊角色



我正在处理一个项目,需要从视图创建PDF。但是在刀片文件中;ß;字符,当我检查代码时,没有包含这些字符的标签。有人能帮我解决这个问题吗?我已经添加了刀片文件代码。请看一看。

<html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">

</head>
<body>
@if (count($data['data']) > 0)
<table class="table table-condensed">
<tr>
<td><img src="{{public_path().'/theme/frontend/images/logo.png'}}"alt="kpvlogo"></td>
<td colspan="8"  style="text-align: center; font-size:24px; font-weight: bold;">Weekly Ranking</td>
<td colspan="6" >Week Ending {{$data['end']}}</td>
</tr>
<tr>
<thead>
<th style="font-weight: bold;">Store</th>
<th style="font-weight: bold;">Net Sales</th>
<th style="font-weight: bold;">+/- Last Year %</th>
<th style="font-weight: bold;">Cust.Count +/- %</th>
<th style="font-weight: bold;">Labour %</th>
<th style="font-weight: bold;">Food %</th>
<th style="font-weight: bold;">Cash %</th>
<th style="font-weight: bold;">GSS</th>
<th style="font-weight: bold;">Complaints</th>
<th style="font-weight: bold;">Speed of Service</th>
<th style="font-weight: bold;">Training</th>
<th style="font-weight: bold;">Rank</th>
</thead>
</tr>
<tbody>
@foreach ($data['data']['grid'] as $item)
<tr>
<td>{{$item['store']}}</td>
<td class="text-right">{{$item['net_sales']}}</td>
<td class="text-right">{{$item['last_year']}}</td>
<td class="text-right">{{$item['customer_count']}}</td>
<td class="text-right">{{$item['labour']}}</td>ß
<td class="text-right">{{$item['food']}}</td>
<td class="text-right">{{$item['cash']}}</td>
<td class="text-right">{{$item['gss']}}</td>
<td class="text-right">{{$item['complaints']}}</td>
<td class="text-right">{{$item['speed_of_service']}}</td>
<td class="text-right">{{$item['training']}}</td>
<td class="text-right">{{$item['rank']}}</td>
</tr>
@endforeach
<tr>
<td colspan="12" class="text-center">Top Performer of the Week</td>
</tr>
<tr>
<td colspan="12" class="text-center">Congratulations to the team from <b>{{$data['data']['top']['store']}}</b>  for achieving the overall best results this week.</td>
</tr>
<tr>
<td colspan="12" class="text-center">Thank You!</td>
</tr>
</tbody>

</table>
@endif
{{-- <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script>
var body_text = $('body').text();
var match = body_text.match('ß');
console.log(match);
</script> --}}

</body>
</html>

如果您能够识别特殊字符在刀片文件中的出现位置,将会有所帮助。看到在你的刀片中找不到任何ß ß ß ß ß ß字符,这表明导致它的原因在你的数据库中。我建议您检查$item的数据和数据库列,其中可以看到字符,您可能会找到原因。