You need to programmatically from php to create a file in Russian windows containing German characters. Russian names are perfectly created after recoding from UTF-8 to Windows-1251. But with names like Sprächt, Kœnig, etc. there are problems. In 1251 there are no such characters. And simply by means of Windows Explorer a file with this name is created. How can I create such a file?

  • in php is not something that with German ... with Russian names then the problem when processing in windows! - Dmitry Nail
  • @DmitryI understand everything, but nevertheless there is a task - Dmitry Kozlov
  • I have been struggling for a long time with the decision to rename files with Cyrillic in the name and it didn’t work for me .... unless I use win api from php which is rather specific. - Dmitry Nail

1 answer 1

PHP 7.1 supports file names in UTF-8 regardless of the system code page. Answered here , details in UPGRADING .

In previous versions of PHP, you can use the com_dotnet extension that comes with the PHP core. Or wfio , available on github.

Thanks.