encoding and decoding text with special characters (àâäèéêë)

Discussão em 'Angular' iniciado por chaitanya reddy, Março 19, 2025.

  1. I am trying to encode the text in angular

    let encodedText = window.btoa("demoé"); //ZGVtb+k=


    when trying to decode the same text in C#, the conversion is not happening properly

    string encodedText= "ZGVtb+k=";
    byte[] data = Convert.FromBase64String(encodedText);
    string decodedString =Encoding.UTF8.GetString(data); //demo�


    after decoding I am getting the value as "demo�". Kindly suggest if there is any other approach to handle this scenario.

    Thanks in Advance!

    Continue reading...

Compartilhe esta Página