更新时间:2023-11-25 09:48:04
尝试:
$csv = iconv("UTF-8", "Windows-1252", $csv);
但是您最终将丢失数据,因为ANSI只能对UTF-8的一小部分进行编码.如果您没有很强的理由反对,请以UTF-8编码格式提供文件.
But you will eventually lose data because ANSI can only encode a small subset of UTF-8. If you don't have a very strong reason against it, serve your files UTF-8 encoded.