0

Whenever i use include() to load a php file, the £ (pound signs) are converted to the diamond question mark (what's the name for this btw?). The head has UTF-8 specified, and on the main pages everything works, but only on the includes is this happening. A simple fix for me would be to use the HTML codes to load these characters, but i'm more interested in WHY this is happening than trying to find a workaround.

Thanks.

brad
  • 1,407
  • 19
  • 33
  • My bet is your file itself is not UTF-8 – Machavity Aug 08 '16 at 16:22
  • @Machavity will check that out now, thank you. Will return here with the solution for others if needed. – brad Aug 08 '16 at 16:24
  • So from what i understand, i need to call mysql_set_charset($link, 'utf8mb4'); ?? The majority of the SQL tables are in latin1_swedish_ci and the rest utf-8. – brad Aug 08 '16 at 16:35
  • You might be able to get with something a bit lighter, like `utf8_general` or `utf8_unicode`, but `utf8mb4` is the only true UTF8 collation. `latin1_swedish_ci` is not really suitable for web development anymore – Machavity Aug 08 '16 at 16:37
  • Check out Google. Lots of tutorials there – Machavity Aug 09 '16 at 00:21

0 Answers0