0

I have file save in CSV format, when I opened in my local machine the Arabic character is coming proper. However when I placed the file in the server the Arabic character is change to سورية

I intsall the Arabic package on the server and remove the file and placed again it’s getting the same issue.

Anyone have a solution please???

Yesterday i tried so many ways

  • 1
    For sure it's an encoding difference. Do you know which code page your local machine is using and which is used by the server? – Mark Ransom Dec 19 '22 at 21:40
  • Hi Mark, how do I know? – HANAN alharbi Dec 19 '22 at 23:16
  • You might start by trying to find out the encoding of your file, https://stackoverflow.com/q/805418/5987 would be a good place to start. Then check your server software, it might have a configuration parameter that makes it independent of the OS. – Mark Ransom Dec 20 '22 at 02:05
  • You don't need the Arabic package; just ensure to open the `csv` file using `utf-8` encoding. You face a [mojibake](https://en.wikipedia.org/wiki/Mojibake) case (*example in Python for its universal intelligibility*): `'أبجدية عربية'.encode( 'utf-8').decode( 'cp1252', 'ignore')` returns `أبجدية عربية` (used a randomly chosen Arabic string from [Wikipedia](https://ar.wikipedia.org/wiki/%D8%A7%D9%84%D9%84%D8%BA%D8%A9_%D8%A7%D9%84%D8%B9%D8%B1%D8%A8%D9%8A%D8%A9)). – JosefZ Dec 20 '22 at 15:14

1 Answers1

0

The problem could be what you're trying to it up in. I often have this problem if I try to open an Arabic csv up directly in Excel. To get it to work in Excel I have to import it and set the encoding as utf-8 in the import dialogue box. Google Sheets is a bit smarter than Excel, and I can open files like that directly, though.

larapsodia
  • 594
  • 4
  • 15