Well, that's really strange, Twig (I'm using it with Symfony 3) replaces non - ascii characters (for example "ł") with entities (e.g. ł
), but... only in Javascript sections.
I have no idea why and how to disable it.
Edit: yes, I have UTF-8 everywhere, in Nebeans and in HTML head section.
Edit2: here is my current code:
{% autoescape false %}
<script>
$(function(){
alert('ółż');
})
</script>
{% endautoescape %}
Even with {% autoescape false %}
(as suggested by Martin) it still does it.