I am spooling csv from sqlplus database in unix os have some Thai characters. After spooling when i am opening csv using ms-excel it is giving me some different encoding characters. The spooled file is UTF-8 format.While opening file using open text/csv and change encoding to 65001(Utf-8) it is working fine.I also added BOM(Byte of mark) character but it didn't work fine.Please suggest any solution to open csv directly in excel without using open text/csv to get correct output with thai characters.
Asked
Active
Viewed 665 times
0
-
Try adding Byte Order Mark `FE FF` (actually UTF-16BE) since the data comes from unix – Theo Dec 09 '18 at 16:02
-
Possible duplicate of [Is it possible to force Excel recognize UTF-8 CSV files automatically?](https://stackoverflow.com/questions/6002256/is-it-possible-to-force-excel-recognize-utf-8-csv-files-automatically) – Tom Blodget Dec 10 '18 at 06:12
-
@Theo That's the right tip but the wrong encoding: EF BB BF (UTF-8) – Tom Blodget Dec 10 '18 at 06:13
-
@TomBlodget The OP already tried the UTF-8 BOM From other posts I learned that csv created from Unix systems better use the UTF-16BE encoding with BOM for Excel to read them properly. Let's see what works for the OP. – Theo Dec 10 '18 at 11:10
-
1@TomBlodget NO, please leave your comment because technically it is correct and the BOM for UTF-8 is `EF BB BF` as you say. In this case however, I'm curious to hear from the OP what worked. – Theo Dec 10 '18 at 11:20