Public Function CP1251toUTF8(ByVal Text As String) As String Dim bufer As String = "" Dim i As Long, IC As Long IC = Len(Text) For i = 1 To IC bufer = bufer & myConvertToUTF8(Mid$(Text, i, 1)) Next CP1251toUTF8 = bufer End Function Private Function myConvertToUTF8(ByVal Character As String) As String If Character = "¨" Then myConvertToUTF8 = Convert.ToChar(208) & Convert.ToChar(129) ElseIf Character = "¸" Then myConvertToUTF8 = Convert.ToChar(209) & Convert.ToChar(145) ElseIf Convert.ToInt32(Character) >= 192 And Convert.ToInt32(Character) <= 223 Then myConvertToUTF8 = Convert.ToChar(208) & Convert.ToChar(Convert.ToInt32(Character) - 48) ElseIf Convert.ToInt32(Character) >= 224 And Convert.ToInt32(Character) <= 239 Then myConvertToUTF8 = Convert.ToChar(208) & Convert.ToChar(Convert.ToInt32(Character) - 48) ElseIf Convert.ToInt32(Character) >= 240 And Convert.ToInt32(Character) <= 255 Then myConvertToUTF8 = Convert.ToChar(209) & Convert.ToChar(Convert.ToInt32(Character) - 112) Else myConvertToUTF8 = Character End If End Function