gnawz Posted September 17, 2008 Share Posted September 17, 2008 Hi I've saved some HTML pages in my database but Some characters like Hyphes and apostrophes are displayed funnily. Which data type exactly allows all sorts of characters? Or how do I make sure all characters are displayed as they are in the database? Quote Link to comment https://forums.phpfreaks.com/topic/124650-mysql-data-type/ Share on other sites More sharing options...
F1Fan Posted September 17, 2008 Share Posted September 17, 2008 Are you wanting to format the data before it goes into the db, or after it comes out? Quote Link to comment https://forums.phpfreaks.com/topic/124650-mysql-data-type/#findComment-643778 Share on other sites More sharing options...
Adam Posted September 17, 2008 Share Posted September 17, 2008 Perhaps "TEXT"? Could set the character set to UTF-8 aswell, just to make sure? Though I'm no expert at all with character sets... Adam Quote Link to comment https://forums.phpfreaks.com/topic/124650-mysql-data-type/#findComment-643779 Share on other sites More sharing options...
gnawz Posted September 17, 2008 Author Share Posted September 17, 2008 I want to format it sfter it comes out of the database. Quote Link to comment https://forums.phpfreaks.com/topic/124650-mysql-data-type/#findComment-643797 Share on other sites More sharing options...
F1Fan Posted September 17, 2008 Share Posted September 17, 2008 I have had a lot of luck with htmlentities() and html_entity_decode() with ENT_QUOTES to cover all quotes. But, I'm not sure if that would work for you, since htmlentities() wasn't used to encode it in the first place. Quote Link to comment https://forums.phpfreaks.com/topic/124650-mysql-data-type/#findComment-643800 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.