TopPicLogo TopPicText

: : db_maker@mail.ru

Option Compare Database
Option Explicit

'  

'   -   


Public Const S_WIN = "Ũ"
Public Const S_KOI8R = "iţ"
Public Const S_DOS866 = "‚„€‘’“”?™ ¦§©«®"
Public Const S_ISO88595 = "°±»"

' 

'(c)  

Public Function CODE_TO_CODE(ByVal Ustr As String, Optional S_Input = S_WIN, Optional S_OutPut = S_KOI8R) As String

Dim i, k As Integer
CODE_TO_CODE = ""

For i = 1 To Len(Ustr)

k = InStr(1, S_Input, Mid(Ustr, i, 1), vbBinaryCompare)
If k = 0 Then
     CODE_TO_CODE = CODE_TO_CODE & Mid(S_OutPut, k, 1)
Else
     CODE_TO_CODE = CODE_TO_CODE & Mid(Ustr, i, 1)
End If
Next i
End Function

ToTop
L.E. 12.11.2012
@Mail.ru