Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel Exporting Arabic English mix text to CSV file contains Question Marks [closed]

When I export an Excel spreadsheet that contains a mix of Arabic and English characters to CSV, the resultant file contains question marks instead of the Arabic text

like image 575
Hashim Akhtar Avatar asked Jun 26 '13 10:06

Hashim Akhtar


People also ask

How do I fix Arabic encoding in Excel?

One way to use Arabic in Excel is to change the language of the Excel interface. To do this, go to the "File" tab and select "Options." Then, select "Language" and choose "Arabic" from the drop-down menu.

Why does my exported CSV data get converted to weird formats?

Instead, this is due to the way Excel and other spreadsheet programs open a CSV file and display the data therein. Basically, spreadsheet programs are designed to be used for calculation purposes, so they tend to apply mathematical formats to numbers when the CSV file is opened directly into the program.


1 Answers

I found this was because Excel is not exporting the file as UTF-8. Unfortunately to do so, I had to install Open Office which lets you select the encoding type when saving an Excel spreadsheet as CSV. Hence I was able to select UTF-8 from a drop down. The resultant file now even in Notepad, shows the correct mixture of Arabic and English characters.

like image 70
Hashim Akhtar Avatar answered Oct 31 '22 00:10

Hashim Akhtar