decode base64 string

G

Guoqi Zheng

Hi,

Any one has a code example of how to decode base64 string?


I used below function but it does not work correctly, especially when I need
to decode some Characters like Chinese,

Can some one give an example or point out what I did wrong here? Thanks.


Public Function DecodeBase64(ByVal strInput As String) As String

Dim ReturnByte As Byte()

ReturnByte = System.Convert.FromBase64String(strInput)

Dim ReturnString As String

ReturnString = System.Text.Encoding.UTF8.GetString(ReturnByte)

Return ReturnString

End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top