Jump to content

Problem With Accents In Mysql


gdfhghjdfghgfhf

Recommended Posts

You're not outputting UTF-8. Well, technically yes you are, but whatever's displaying the characters doesn't think they're UTF-8.

 

For PHP send another header:

header("Content-Type: text/html; charset=utf-8");

(or any other text/* type)

 

For HTML:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

(same as the header above)

 

For XML:

<?xml version="1.0" encoding="utf-8" ?>

 

 

Though it could be you're doubly-encoding the stuff. Remove the call to utf8_encode() and see if that fixes it. But the above changes are still important so make sure something like them is in place.

Edited by requinix
Link to comment
Share on other sites

Well when i look in phpmyadmin the accents aren't correctly displayed

"é" are displayed as "é" in the database

 

so i don't think the problem is about output... I also have other strings with accents on the same page and they are correctly displayed. I only have a problem with accents coming from SQL.

 

I also tryed without utf8_encode()

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.