Page 1 of 1

Failing to send parameters that have characters outside of latin 1 range in angular

Posted: Mon May 10, 2021 8:50 am
by vitek.abeln
Hello,

I am using the stimulsoft viewer for angular (v2021.2.4) and I am trying to send an object that contains "ščž" characters. But I get a "Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range." error. The properties I am sending is an object with text values. I have researched and I saw that the properties go through a "btoa(JSON.stringify(myParameters))" function before being sent. So the JSON gets converted to a base 64 string wich has a limited range. Is there a way I can send an object that contains text outside of the lating1 range?

Best regards

Re: Failing to send parameters that have characters outside of latin 1 range in angular

Posted: Wed May 12, 2021 7:48 am
by Vadim
Hello.

Please use unescape(encodeURIComponent(str)) for "ščž" characters
https://stackoverflow.com/questions/232 ... s-characte

Re: Failing to send parameters that have characters outside of latin 1 range in angular

Posted: Wed May 12, 2021 10:24 am
by vitek.abeln
This worked. Thank you

Re: Failing to send parameters that have characters outside of latin 1 range in angular

Posted: Wed May 12, 2021 2:06 pm
by Lech Kulikowski
Hello,

You are welcome!