V
V
Vitaly Vitaly2015-12-16 20:37:57
Character encoding
Vitaly Vitaly, 2015-12-16 20:37:57

How to deal with encoding?

Hello! It is necessary to migrate files, for this I read folders and files inside to create a "skeleton" of the transfer.
The original folders and files were in cracks. Translated them into a readable form:
convmv -rf cp1251 -t utf-8 --notest
Next, I get folders recursively, they are displayed in cracks, I fix them on the go. Next, I need to get files from this folder, and here is the problem. He sees files only in folders with an English name with a Russian name, he simply skips them, and he also skips Russian folders inside Russian ones. Checked is_dir - says false for Russian folders. I do not understand how I can achieve the correct encoding? It all happens on Windows. I know, in linux this would not be, but it is necessary on win.
iconv('windows-1251', 'utf-8', $str);

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaly Vitaly, 2015-12-16
@V_Tjuryakin

THE ANSWER IS NOT FOUND.
Put Homestead (Vagrant) and the problem was solved by itself.

I
Ivanq, 2015-12-16
@Ivanq

Maybe try is_dir(iconv(...)) ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question