0

I have been reading quite some posts including this one

Javascript export CSV encoding utf-8 issue

I know lots mentioned it's because of microsoft excel that using something like this should work

https://superuser.com/questions/280603/how-to-set-character-encoding-when-opening-excel

I have tried on ubuntu (which didn't even have any issue), on windows10, which I have to use the second posts to import, on mac which has the biggest problem because mac does not import, does not read the unicode at all.

Is there anyway I can do it in coding while exporting to enforce excel to open with utf-8? or some other workaround I might be able to try?

Thanks in advance for any help and suggestions.

3
  • The direct path for users is to use Excel's text file import wizard. Then they can answer all the umpteen metadata questions that need to come with CSV files. (Or, just export to an open-standard file format that carries all the metadata, such as .xlsx.) Commented Mar 25, 2019 at 16:31
  • Possible duplicate of Is it possible to force Excel recognize UTF-8 CSV files automatically? Commented Mar 25, 2019 at 16:33
  • @TomBlodget I did see that post too and tried. Somehow that mac's excel does not work too. Could this be the problem with the machine / software itself instead of the coding? Commented Mar 25, 2019 at 16:38

1 Answer 1

0

Many Windows applications, including Excel, assume the localized ANSI encoding (Windows-1252 on US Windows) when opening a file, unless the file starts with byte-order-mark (BOM) code point. While UTF-8 doesn't need a BOM, a UTF-8-encoded BOM at the start of a file clues Excel that the file is UTF-8. The byte sequence is EF BB BF and the equivalent Unicode code point is U+FEFF.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.