Function WinDecodeDos(strTXT As String) As String
Dim i As Integer
Dim strDOS() As String
Dim strDOS_TXT As String
ReDim strDOS(1 To Len(strTXT))
Dim mmm As Integer
For i = 1 To Len(strTXT)
mmm = Asc(Mid(strTXT, i, i))
If mmm < 192 Then
strDOS(i) = Chr(mmm)
Else
If mmm >= 240 And mmm <= 255 Then
strDOS(i) = Chr(mmm - 16)
ElseIf mmm >= 192 And mmm <= 239 Then
strDOS(i) = Chr(mmm - 64)
End If
End If
Next i
For i = 1 To UBound(strDOS, 1)
strDOS_TXT = strDOS_TXT & strDOS(i)
Next i
WinDecodeDos = strDOS_TXT
End Function
|