Php importing google contacts csv file

After reading the csv file, I get question marks in the answer. check the image below for more reference.

enter image description here

I am trying to import google contacts into my web application. This is my code

$csvAsArray = array_map('str_getcsv', file($tmpName));
        foreach($csvAsArray as $arr){


where $ tmpName is the location of the file. Any help would be appreciated.


source to share

1 answer

Using iconv ('UTF-16', 'UTF-8', $ fileContent) on my CSV server solved the problem for me.



All Articles