fgetcsv()
makes assumptions about the file's encoding based on the system locale. As the PHP manual states:
Locale setting is taken into account by this function. If
LANG
is e.g.en_US.UTF-8
, files in one-byte encoding are read wrong by this function.
You might want to compare the locale settings on your two machines and either permanently change it on one of them, or use something like setlocale(LC_ALL, 'ar_AE.utf8')
(the second argument would obviously depend on your file's encoding) before your fgetcsv()
.