I am trying to read a CSV file containing Arabic text using Python.
The Arabic text is not displaying correctly when I read the file.
Here’s what I have done so far:
The Arabic text in the CSV file is not displaying correctly after reading it. I have tried using different encodings (cp1256, iso-8859-6), but the text still appears garbled.
How can I correctly read and save the CSV file containing Arabic text using Python? Is there a specific encoding I should use, or is there a better approach to handle this issue?
Example of the issue
Order ID MAGENTO Order Date Status Payment Method
0 10 5/30/2024 11:44 Pending ?? ??
1 40 5/31/2024 11:44 Pending ?? ??
2 30 6/1/2024 11:44 Pending ?? ??
3 55 6/2/2024 11:44 Canceled ?? ??
4 56 6/3/2024 11:44 Pending ?? ??
user25359876 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.