Guest User

Untitled

a guest
May 22nd, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. mb_convert_encoding($str, 'UTF-8', 'auto');
  2.  
  3. $file = 'images/да так 1.jpg';//this is in UTF-8, needs to be system encoding (Russian)
  4. $new_filename = mb_convert_encoding($file, "Windows-1251", "utf-8");//turn utf-8 to system encoding Windows-1251 (Russian)
  5.  
  6. $new_filename = mb_convert_encoding($file, "utf-8", "Windows-1251");
Add Comment
Please, Sign In to add comment