I've tried using decodeURIComponent()
and decodeURI()
in javascript on the String "Завтра была война", which my MySQL database encoded on entering from "Завтра была война"
When I enter this String on (some) decoding websites (like https://2cyr.com/decode/ or https://encoder.mattiasgeniar.be/) it decodes just fine, on others it doesn't work (https://www.browserling.com/tools/utf8-decode) and it also doesn't work with the aforementioned function javascript provides (seen here: https://www.w3schools.com/code/tryit.asp?filename=G6VG1L4MSBD8).
Why is that the case? Is this a different UTF-8 encoding than what decodeURI[Component]() is for? Can Javascript even decode my specific (already encoded) String or do I have to change the database?