3

i'm trying to create a file with name "Дискография" but in the folder appears with the name ДиÑкографиÑ.

The php file is in UTF-8. I'm working on windows. My file system is NTFS.

i have this:

<?php

    $nombre = "Дискография";
    $fp = fopen("C:/$nombre", 'w+');
    fclose($fp);

?>

1 Answers1

0

Looks like this was addressed somewhat in another answer: How do I use filesystem functions in PHP, using UTF-8 strings?

Original/old answer:

It probably depends on the coding of your filesystem, but at a guess, I'd use:

    $nombre = utf8_encode("Дискография");
Community
  • 1
  • 1
Stephen O'Flynn
  • 2,309
  • 23
  • 34