PHP encoding - UTF-8
With cURL I am saving files which have UTF-8 chars in filename. For example:
When I used mb_detect_encoding() it returned me ASCII. So i tried to convert it with iconv from ASCII to UTF-8 and from UTF-8 to UTF-8. Neither option worked.
So anyone has some suggestion how could I keep UTF-8 file names?
Your file system (and operating system) must support UTF-8 encoded file names in order to retain files that use UTF-8 in the file name. If either do not support that, then the best option is to either convert them into a known transliteration, or discard (replace) the characters that cannot be converted.
In analogy with MySQL, when your MySQL data is encoded in UTF8 you should have php read it through a UTF8 "communication" so since your HTML data is in UTF8 i think your problem is (tho i don't have all your code to know if im correct) that you are not reading it as UTF8
Try adding this option to your cURL config:
curl_setopt( $ch, CURLOPT_ENCODING, "UTF-8" );
I don't know if this IS what you are missing, but in case not let me know and i'll update my answer...