_Encoding('wrar40b4ru_config')
_Encoding('wrar40b4_config')
exit
Func _Encoding($tf)
$file = FileOpen($tf & '.txt', 16)
$sRead = FileRead($file, 4)
FileClose($file)
$nByte12 = BinaryMid($sRead, 1, 2)
$nByte4 = BinaryMid($sRead, 4, 1)
$file = FileOpen($tf & '.txt', 0)
$str = FileRead($file)
FileClose($file)
If $nByte12 = '0xFFFE' Then
If $nByte4 <> '0x00' Then $str = BinaryToString(StringToBinary($str, 2))
$file = FileOpen($tf & '_1251.txt', 2)
FileWrite($file, $str)
FileClose($file)
EndIf
EndFunc ;==>_Encoding