jesushax Posted July 28, 2009 Share Posted July 28, 2009 hi all i have a form, with just a basic text area that when the form is submitted it goes to a mysql database in the form if a user types - (dash) in the mysql db it comes out as — how can i sort this out? i dont mind it being a — but for viewing (meaning echoing the data onto a webpage) how can i turn the — back to a -(dash) thanks Quote Link to comment https://forums.phpfreaks.com/topic/167800-dash-gets-replaces-by-%C3%A2%E2%82%AC%E2%80%9D-when-submitting-to-mysql-db/ Share on other sites More sharing options...
aschk Posted July 28, 2009 Share Posted July 28, 2009 The dash isn't actually a normal dash, you'll find it's a nasty MSWord elongated dash... yuck! One is hoping you're storing all your database in your database as UTF-8, and you will also need to make sure your page encoding on output is UTF-8 also. Quote Link to comment https://forums.phpfreaks.com/topic/167800-dash-gets-replaces-by-%C3%A2%E2%82%AC%E2%80%9D-when-submitting-to-mysql-db/#findComment-884984 Share on other sites More sharing options...
jesushax Posted July 28, 2009 Author Share Posted July 28, 2009 how so i do this? if the database isnt already in UTF-8? what will happen when i transfer it over? also is it the header that outputs the current page on UTF-8? THanks Quote Link to comment https://forums.phpfreaks.com/topic/167800-dash-gets-replaces-by-%C3%A2%E2%82%AC%E2%80%9D-when-submitting-to-mysql-db/#findComment-884996 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.