Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Issues with special characters REST controller
  • Hi guys!
    I'm having an issue with special characters like "á é í ñ" etc..
    they're being transformed to their unicode form ñ => "\u00f1" for example.
    It doesn't matter if I write them down like
    $this->response('ñ',200);
    

    or I grab data from the database and put it on the response.
    How can I fix that?
    Thank you very much!
  • If you put them in code like that, in what format is your source saved? FuelPHP uses and expects utf8 everywhere. In what format are your pages (again, FuelPHP defaults to utf8 for views), and what characterset are you using on your database connection? They all have to be in sync, otherwise you're up for some nasty suprises, as you have noticed.
  • I just realized that the forum has issues with the punctuation ....
    I'm writing the vocals with a "tilde" and the "n" with a tilde too
    Hopefully someone will know the answer
    thanks!

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion