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

  • 3 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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