--Трансформация строк WIN/DOS/WIN sequence tempora integer ch -------------------------------------------- global function win2dos(sequence winstr) if length(winstr) then tempora = {} for i=1 to length(winstr) do ch = winstr[i] if ch > 239 then tempora &= (ch-16) elsif ch > 191 then tempora &= (ch-64) elsif ch = 184 then tempora &= 241 elsif ch = 168 then tempora &= 240 else tempora &= ch end if end for return tempora else return {} end if end function -------------------------------------------- global function dos2win(sequence dosstr) if length(dosstr) then tempora = {} for i=1 to length(dosstr) do ch = dosstr[i] if ch < 176 then tempora &= (ch+64) elsif ch < 240 then tempora &= (ch+16) elsif ch = 241 then tempora &= 184 elsif ch = 240 then tempora &= 168 else tempora &= ch end if end for return tempora else return {} end if end function --------------------------------------------