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

Stimulsoft Reports.WEB discussion
Post Reply
vitek.abeln
Posts: 18
Joined: Thu Nov 05, 2020 2:14 pm

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

Post 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
Attachments
Screenshot_1.png
Screenshot_1.png (43.97 KiB) Viewed 2270 times
Vadim
Posts: 362
Joined: Tue Apr 23, 2013 11:23 am

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

Post by Vadim »

Hello.

Please use unescape(encodeURIComponent(str)) for "ščž" characters
https://stackoverflow.com/questions/232 ... s-characte
vitek.abeln
Posts: 18
Joined: Thu Nov 05, 2020 2:14 pm

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

Post by vitek.abeln »

This worked. Thank you
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

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

Post by Lech Kulikowski »

Hello,

You are welcome!
Post Reply