Jump to content

Accents, special characters etc...


roscminni
 Share

Recommended Posts

Could you try this? :

window.onload = function () {    var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update});    function preload() {    }    function create() {        var text = "- phaser -\n  áéíóú ÁÉÍÓÚ ñÑ";        var style = { font: "65px Arial", fill: "#ff0044", align: "center" };        var t = game.add.text(game.world.centerX-300, 0, text, style);    }        function update() {    }};
Link to comment
Share on other sites

I have used Phaser with Spanish text and it works perfectly well. I think it has nothing to do with Phaser but with the HTML files. As you said, you should use in the header:

 

<meta charset="utf-8" />

 

But that is not enough, take into account that your text editor should be able to save your HTML file in UTF-8. Probably, the 'meta' says your 'charset' is UTF-8 but the file it is not.

Link to comment
Share on other sites

Thanks PhaserFan, that was the answer.

 

I'm using eclipse with the aptana plugin, which seems to default to CP1252 charset - which is odd because I aptana is for web development and UTF-8 is the most common charset used. Strange. 

Link to comment
Share on other sites

  • 3 months later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...