This file contains '£' which CSVI and Joomla do not like when it is in ANSI format. I need to convert it to UTF-8 in order to import such characters. Of course to convert, I will need to store locally as well. Here's my research:
First thing is to get the file and store on server:
Found the PHP function ftp_get
Once on the server, I found two ways to convert:
mb_convert_encoding()
iconv()
this is quite helpful for getting and writing the file:
$file = file_get_contents('file.php');
$file = iconv('greek-charset','UTF-8', $file);
file_put_contents('file.php', $file);
//ta-da!
No comments:
Post a Comment