TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Absolute Beginners (http://www.talkphp.com/absolute-beginners/)
-   -   Unexpected characters in output (http://www.talkphp.com/absolute-beginners/3789-unexpected-characters-output.html)

Killswitch 12-19-2008 02:25 AM

Unexpected characters in output
 
I am getting some weird characters in the output from my script. It is a light CMS that enters content in the database. When I output from the database, I get characters like  right after all periods.

What causes this? My database collation is latin1_swedish_ci and my template document sets the page as UTF8 ( browser is also showing UTF8 ).

Is this an encoding issue? I thought for a second maybe I should change the collation to UTF8, but there's so many choices in the database for that. Then I checked out UTF8_encode PHP function, but wasn't sure if I should all data entered into the database through this.

sketchMedia 12-19-2008 10:23 AM

Sounds like it to me, the data within the DB wont be utf therefore its not going to make a difference if you send 'utf8' headers.

You will have to change the DB encoding, a small article i found on the matter (assuming you use mysql)
http://www.khelll.com/blog/mysql/cha...latin-to-utf8/

Killswitch 12-20-2008 04:29 AM

Thanks, this seemed to solve the problem. Figured this was what was causing it.


All times are GMT. The time now is 09:11 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0