from Dos to WiN

Hello! How can I recode a DOS file to WinN using php! please help!

Answer 1, authority 100%

not DOS, but

echo iconv("cp866", "cp1251//IGNORE", file_get_contents('__'));

Answer 2, authority 50%

There is a function iconv

I don’t really remember what the DOS encoding is called, but something like this would be:

iconv('DOS', 'cp1251', $string)

Answer 3, authority 50%

$str = convert_cyr_string($str,'d','w');

For example, like this.