Тема: Перекодировка OEM <-> ANSI

'===============================
'/*   Перекодировка символа                */
Function CharOEMtoANSI(symbol)
  Dim code
  Dim res
      code=Asc(symbol)
      if ((code>=128) and (code<=175)) then
    res = Chr(code+64)
      elseif ((code>=224) and (code<=239)) then
            res= Chr(code+16)
      else
            res = symbol
      end if
  CharOEMtoANSI=res
end Function
'===============================
Function CharANSItoOEM(symbol)
  Dim code
  Dim res
      code=Asc(symbol)
      if ((code>=176) and (code<=239)) then
    if(code=185) then
              res= Chr(code+67)
    else
              res= Chr(code-64)
    end if
      elseif ((code>=240) and (code<=255)) then
            res= Chr(code-16)
       else
            res= symbol
      end if
      CharANSItoOEM=res
end Function

'===============================
'/*   Перекодировка строки                 */
Function OEMtoANSI(st)
  Dim i
  Dim slen
  Dim tmp
  slen=Len(st)
  i=0
  tmp=""
      While(i<sLen)
            i=i+1
            tmp=tmp+CharOEMtoANSI(Mid(st,i,1))
      wend
      OEMtoANSI=tmp
end Function

'===============================

Function ANSItoOEM(st)
  Dim i
  Dim slen
  Dim tmp
  slen=Len(st)
  i=0
  tmp=""
      While(i<sLen)
            i=i+1
            tmp=tmp+CharANSItoOEM(Mid(st,i,1))
      wend
      ANSItoOEM=tmp
end Function

Может быть использовано для работы с требующими OEM кодировки форматами (например: АРПС - сметы)