Client side code (angularjs controller)
var p="gemüse8";
var pb= $base64.encode(p); // pb= Z2Vt/HNlOA==
from server side(C#)
string b64="Z2Vt/HNlOA==";
byte[] data = Convert.FromBase64String(b64);
string decodedString = Encoding.UTF8.GetString(data);
result showing "gem�se8"
How can i properly decode this string?
$base64.encodeis seems to be using iso-8859-1 (or similar) rather than UTF - which probably needs addressing - as it stands useEncoding.GetEncoding("iso-8859-1").GetString(data)