The Slim Framework support forum has moved to http://discourse.slimframework.com. This Tender forum is no longer maintained or monitored.

utf8 problems

mads's Avatar

mads

15 Oct, 2015 01:01 PM

I am having a hard time getting utf8 special characters like æ ø å out.

In my db con i have
"CharacterSet" => "UTF-8"
and it works on pages that dosent use the slim framework.

in my slim app, i have:

 $app->contentType('text/html; charset=utf-8');

and when i make my json data i have:

    $app->response()->headers->set('Content-Type', 'application/json;charset=utf-8');

but my special characeters are still not comming out right, what am i missing?

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac