• When Excel opens a CSV file it assumes it is encoded using the default locale. If the blog_charset is utf-8, then this causes problems if the exported CSV contains any non-7bit characters. If you export latin-like content it’s not noticeable because those encodings match in the lower 7 bits. However exporting high characters or non-latin languages like Hebrew/Arabic/etc… produces garbage when opened in Excel. The only way to force Excel decode utf-8 properly across different environments is to prepend the utf-8 BOM to the exported file.
    I’ve solved this problem locally by modifying the admin/admin.php source file in 2 places that generate the exported CSV content. After the appropriate headers are sent, the BOM is sent via: echo chr(239) . chr(187) . chr(191);
    I suggest adding this or similar change to the official source code, so others may benefit from the fix.

    Thank you for the highly beneficial plugin.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Proposed fix for CSV export Excel bug using UTF-8’ is closed to new replies.