0

I've saved all my .php files as utf-8, and everything works fine. whenever I enter certain characters, such as å and ë, it works just fine. however, with the data is retrieved from the database through a mysqli query, and then put into the $page variable which eventually is echo'ed at the end of the document, it displays a ? where there should be a ë. when I make an empty page, with only the dbconnect, the query, and make that echo nothing but the table from the database that contains this character, it works just fine.

my question is: how can I make sure it does show the ë and å and such, and not a ? ?

1 Answers1

0

Your database is probably configured "wrong". When the fields holding your to-be-echoed text are not configured with the proper charset (utf-8), the data you retrieve via php are not either.

So, configure your database properly and insert the data there after that.

Also see How to make MySQL handle UTF-8 properly.

Community
  • 1
  • 1
SamuelTee
  • 188
  • 8