Tracing in browser sometimes causing "malformed Unicode character" error


Sometimes, an random trace statement - that has caused no problem before - causes a runtime error in the browser: “SyntaxError: malformed Unicode character escape sequence”

Any ideas why, and what to do about it?

Does the trace always trigger the runtime error? Can you post an example of an offending line and maybe the Haxe source code too?

The problem is that it’s not predictable/reproducable, as far as I have found.
Removing the trace line causing the error, solves it, but then it might pop up again with some other trace that never caused any problem before…

Anyone recognizes this?

Do you have an unescaped backslash in your strings somewhere?

Nope, just plain strings. Maybe my preference for Swedish language might be a clue…?

Next time this happens, please, post the original string and the compiler output of that string.