M
M
mrWan2017-10-31 22:25:18
PHP
mrWan, 2017-10-31 22:25:18

You always have to recode filenames to cp1251 if the files have Cyrillic in their names. Can it be made easier?

As I understand it, directories in windows are encoded in cp1251, and because of this, when working with directories, everything has to be recoded from utf-8 to cp1251. Is it possible, for example, to recode a directory to utf-8? Or what is the best way out of this problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Fuze, 2017-11-01
@InstantMedia

If you understand the question correctly, then use this function .
Somewhere at the beginning of your script:

setlocale(LC_ALL, 'ru_RU.UTF-8');
setlocale(LC_NUMERIC, 'POSIX');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question