mattVo Posted June 17, 2009 Share Posted June 17, 2009 Hi all, I use a php form for people to upload bios of themselves, stored as a TEXT datatype in MySQL. Problem is, there are strange accents stored in the database. How would I prevent this for future posts from people who use the form? Collation? I use Latin1_swedish_ci, doesnt this one contain most of the special characters? I think what people do is copy paste from Word, so it might be Word formatting? Thanks all! Matt Link to comment https://forums.phpfreaks.com/topic/162661-strange-characters/ Share on other sites More sharing options...
fenway Posted June 22, 2009 Share Posted June 22, 2009 UTF-8 covers most characters, unlike latin1, which you are using. Link to comment https://forums.phpfreaks.com/topic/162661-strange-characters/#findComment-860976 Share on other sites More sharing options...
mattVo Posted June 22, 2009 Author Share Posted June 22, 2009 Thanks! I noticed that by changing my html's page character set to iso-8859 that it fixed my database problems. Probably had to do with how the page handled user inputs in the form's POST, right? Link to comment https://forums.phpfreaks.com/topic/162661-strange-characters/#findComment-861283 Share on other sites More sharing options...
fenway Posted June 27, 2009 Share Posted June 27, 2009 You have to make sure everything -- html, php, mysql -- are all aware of the correct character set. Link to comment https://forums.phpfreaks.com/topic/162661-strange-characters/#findComment-864757 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.