Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Showing � instead of £

the symbol � is showing instead of £ when pulling data from the mysql database

the field in question its collated to utf8_general_ci

I also have the <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> on the head tag of the page

Any ideas please?

like image 380
nead93 Avatar asked Feb 22 '11 13:02

nead93


People also ask

Why is my keyboard showing in place of @?

This has happened because a recent Windows 10 update changed the default language and region settings to US English. To fix it, click the Windows button in the far left hand corner of your taskbar (or tap the Windows key on your keyboard) and start typing “Region & language settings”.

How do I change my keyboard back to normal?

Among the different keyboard languages, the universal keys are constant. This means that the keys such as Esc, Ctrl, Shift, and Windows keys are similar for all keyboards. To quickly change to the default language, use the shortcut Win + Spacebar. You will see a small popup on the right listing all the added languages.

Why are my keys typing different symbols?

Go to Control Panel and select the group Clock, Language, Region. Select language and choose Advanced Settings. Locate the option Override on Default Input Method and select preferred language from the drop-down menu. Set the Override for Windows Display Language to the same language, hit OK, and restart your computer.


1 Answers

Use mysql_query("SET NAMES 'UTF8'"); before you perform any queries to the database.

like image 124
Michiel Pater Avatar answered Oct 18 '22 22:10

Michiel Pater