This one has me stumped. I am using an InkEdit Control called "txtDisp" in order to display UTF-8 samples.
On 4 of those samples, everything works as it should. However, on the above sample it shows:
I have narrowed it down to the line:
txtDisp = txtDisp & sUtf8 & vbCrLf
If I remove that line, I get:
Any ideas?
J.A. Coutts
Code:
Private Sub cmdHebrew_Click()
Dim sUtf8 As String
Dim bRev() As Byte
DispByte "Hebrew", bHebrew
sUtf8 = Utf8ToStr(bHebrew)
txtDisp = txtDisp & sUtf8 & vbCrLf
bRev = StrToUtf8(sUtf8)
DispByte "Reversed", bRev
txtDisp = txtDisp & "String Size:" & Len(sUtf8) & " Byte Size:" & GetbSize(bHebrew) & vbLf
End Sub
Code:
Hebrew:
61 62 63 20 D7 9B D7 A9 D7 A8 20 66 31 32 33
abc כשר f123
Reversed:
61 62 63 20 D7 9B D7 A9 D7 A33 32 31 66 20 8
String Size:12 Byte Size:15
txtDisp = txtDisp & sUtf8 & vbCrLf
If I remove that line, I get:
Code:
Hebrew:
61 62 63 20 D7 9B D7 A9 D7 A8 20 66 31 32 33
Reversed:
61 62 63 20 D7 9B D7 A9 D7 A8 20 66 31 32 33
String Size:12 Byte Size:15
J.A. Coutts