VB PDU mode 7 bit decoding

Source: Internet
Author: User
Tags integer
Dim Tep as String
Dim Temp as String
Dim I as Integer
Dim B as Integer
Dim Rems as String
TEP = rmsg
i = Len (TEP)
If I < 1 Then Exit Function

B = I/2

If i = B * 2 Then
Tep = Left (TEP, B * 2)
Else
B = B-1
Tep = Left (TEP, B * 2)
End If

Chg7 = ""
Rems = ""
Dim Trint as Integer
Dim strtmp as String

Trint = 1
strtmp = ""

For i = 1 to B
temp = "&h" & Mid (Tep, (i-1) * 2 + 1, 2)
temp = D_to_b (Val (temp)) ' Turn binary

If Len (temp) < 8 Then
temp = STRPLA (8-len (temp)) + Temp
End If

strtmp = Mid (temp, trint + 1, 8-trint) + Rems

Rems = Mid (temp, 1, trint)


Chg7 = Chg7 & ChrW (CInt (Val (b_to_d)))

Trint = trint + 1
If Trint = 8 Then
Trint = 1
Chg7 = Chg7 & ChrW (CInt (Val (b_to_d)))
Rems = ""
End If


Next I




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.