Illegal state for UTF-8 encoded string


I am trying to add some JavaScript to a Web Block but am getting an error: Illegal state for UTF-8 encoded string when i try and publish it.

The JavaScript is from

When I add it via the AddJavaScriptTag action and use the CloudFlare URL it works but I don't want to use a third party CDN I want it adding to Outsystems.

I have tried to encode it as UTF-8 using Notepad++ but still get the error. 

I have added it to my Personal Environment where it published ok so I am wondering if it's a Java stack issue?

Outsystems Version 10.0.708.0 on Java.


How do you add it?

As a resource or cut/paste in javascript-file?

Copy & Paste into the JavaScript section of a Web Block.


Hi Stuart,

In .NET it seems to compile fine, copy/pasting into the Web Block JavaScript. Just for testing, could you find the part that says


and replace those triangle characters by something else (e.g. "V" and "^")? Those are the only suspicious characters that I can spot.


Hi Kilian,

I changed the section as you suggested and it now publishes ok. Thanks for your help!


Hi Stuart,

You're welcome! What I guess happened is that these non-UTF characters got interpreted as UTF, causing the error. What you could do is replace them again with the proper Unicode characters for the characters, i.e. BLACK DOWN-POINTING TRIANGLE (U+25BC) and BLACK UP-POINTING TRIANGLE (U+25B2).

I have replaced them with the correct version and it is working perfectly now.

Thanks again

Again glad to be of help :).