I have the issue while trying to transliterate the name of the csv file that shall be uploded from the user. Here is the code:
ini_set("intl.error_level", E_WARNING);
$raw_file = str_replace(' ', '_', basename($_FILES["fileToUpload"]["name"]));
$file = transliterator_transliterate("Ukrainian-Latin/BGN", $raw_file);
var_dump($file);
Once i run the code error appers: Warning: transliterator_transliterate(): String conversion of string to UTF-16 failed
var_dump returns obviously "boolean false".
Checking the $raw_file coding gives me that it is UTF-8. The interesting thing is when I assignt to $raw_file plain sting (here encoding is UTF-8 as well) f.e.
$raw_file = "2.II._Продукти_рослинного_походження.csv";
the transliteration works perfectly.
Pls help to solve this. Tnks.