runtime ASCII to Unicode convertion


When you recieve ascII-coded strings with non-latin symbols (asc > 128) you can not directly display it as a text (since IWS uses UTF16). So it may be done by convert function like this one:

Function ConvStr(s)
Dim i, h, c
Dim res
res = ""
For i = 1 To Len(s)
c = Mid(s, i,1)
h = AscW(Mid(s, i,1))
If (h>&hC0) Then
c = ChrW(&h0410 +(h-&hC0))
End If
res = res + c
Next
ConvStr = res
End Function

Best Regards