Currently we are facing an issue while decoding the Base64Encoded unicode data.
Here is the scenario
We have one custom javascript function that encodes the unicode data using Base64 mechanism. After encoding the data on client side we are sending it back to the server. On Server side we are decoding this unicode data using microsoft framework inbuild functions as below
Expand|Select|Wrap|Line Numbers
- Private Function DecodeVarHash(ByVal strEncoded As String) As string
- Dim strDecoded As String = ""
- If strEncoded <> "" Then
- Dim enc As New System.Text.UTF8Encoding
- Try
- Dim Buffer As Byte() = Convert.FromBase64String(strEncoded)
- strDecoded = enc.GetString(Buffer)
- Catch ex As Exception
- End Try
- End If
- Return strDecoded
- End function
Can any body help me how to decode the client side unicode data properly on server side?
Regards
Amol Lokhande