Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15438

Problem with InkEdit Control

$
0
0
This one has me stumped. I am using an InkEdit Control called "txtDisp" in order to display UTF-8 samples.
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

On 4 of those samples, everything works as it should. However, on the above sample it shows:
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

I have narrowed it down to the line:
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

Any ideas?

J.A. Coutts

Viewing all articles
Browse latest Browse all 15438

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>