Php importing and exporting from excel csv file chinese font are messed up with ??? and different symbols -


i want import , export product data in different language database table using php file. other language except chinese language chinese fonts messed up.

i have used export functioality:-

      mb_convert_encoding($results[$i]->name, "utf-16le"); 

for import functioality

       header('content-type: text/html; charset=utf-8');         $data = array_map("utf8_encode", $data);  

you can use,

setlocale(lc_all, 'en_us.utf-8'); 

before getting content file. fetch , parse content in other languages.

reference: fgetcsv() not reading arabic characters


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -