You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When open output UTF-8 CSV file by excel, if the UTF-8 CSV is lack of BOM header , Excel will identify CSV as ISO-8858-1 encoding. The Chinese character inside the Excel will unreadable.
function toCSV($delm="\t", $add_title=true, $encoding=null)
{
$out = '';
// add BOM if UTF-8
if ($encoding == 'UTF-8')
$out = chr(239) . chr(187) . chr(191);
The text was updated successfully, but these errors were encountered:
From my experience, BOMs usually cause more problems than they solve but in this case, it might make sense. Could you possibly check if the CSV (with BOM) also works when imported in Outlook? That's another very important use-case.
CSV with BOM still can be imported to outlook in my test. The only defect is the first field name will include BOM, but it will not effect the data in first column.
However, there are still additional two issue when importing Traditional Chinese CSV to outlook.
CSV must use Big5 encoding
the EOL character must be CR+LF
You may consider to add option for BOM and EOL in UI.
When open output UTF-8 CSV file by excel, if the UTF-8 CSV is lack of BOM header , Excel will identify CSV as ISO-8858-1 encoding. The Chinese character inside the Excel will unreadable.
The text was updated successfully, but these errors were encountered: