I have a variable containing the following data (in Arabic):
1, أحمد, علي
5, فهد, سعد
I successfully saved it as a CSV file. However, when I open it in Google Sheets or Excel, the text appears as unreadable symbols. I can view it correctly in Excel only if I manually change the encoding.
I want the data to display correctly in Excel without requiring the user to adjust the encoding settings. I believe saving the CSV file using UTF-8 with BOM might solve the issue. However, after two days of searching and trying different solutions, I still haven’t found a way to make it work.
I appreciate your help.
This is my first project, and I don’t have the level of experience you might expect.
Could you kindly provide me with a simple example?