Question Converting a csv file to utf-8
I am using the fopen and fgets function to open a csv file loop through the first few records and perform certain task...the problem is when my php script tries to open a non-utf-8 csv, it fails to read it...but if I convert that csv (using an editor) to utf-8 format then my php script works fine.
So what I was wondering is if there is anyway in php to check if a file is non utf-8, if so then convert the file to utf-8 so that I do not have to manually convert the character set.
Thanks for any inputs.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)