Jump to content

include() utf-8 encoding problems


stevietat

Recommended Posts

So here's the situation:

 

I have a footer element (footer.php) that I am inserting into every page with an include(). In the snippet I have it doing a mysql search, where it will be returning non-latin characters (japanese). If I try view the footer.php snippet by itself, the characters display correctly. But when I include() it in another page, the characters all turn into question marks.

 

The page its been included in has its headers and everything set to UTF-8 and if I copy and paste the code from the footer.php into the page itself, the characters display correctly too.

 

I can only think something is going funky in the include() statement. Is there some way to ensure it is including the file with utf-8 encoding? I've been doing all this work in dreamweaver with utf-8 files, with BOM turned off.

 

Any ideas/advice would be awesome!

Link to comment
https://forums.phpfreaks.com/topic/148513-include-utf-8-encoding-problems/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.