decode base64 string

  • Thread starter Thread starter Guoqi Zheng
  • Start date Start date
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
 
Back
Top