mameha Posted October 28, 2008 Share Posted October 28, 2008 I have a load of data, most of it looks OK but sometimes there are 'funny' characters in there which are causing problems. 1) For example when I import data to MySQL from the .sql file, the following character "・" seems to cause mysql to stop importing the field at that point (so all data in the field after that character is lost). I think that character is supposed to be a double quote, but due to encoding has been changed. 2) There are some japanese characters in the text, which surely were not input by the user. For example "GT痴 ". I think somehow the old system input them like that, or adding them when exporting to me. How can I get ride of those bad characters? Quote Link to comment https://forums.phpfreaks.com/topic/130367-character-encoding-how-to-fix-funny-chars/ Share on other sites More sharing options...
fenway Posted October 29, 2008 Share Posted October 29, 2008 I assume your text file is UTF08? Quote Link to comment https://forums.phpfreaks.com/topic/130367-character-encoding-how-to-fix-funny-chars/#findComment-677765 Share on other sites More sharing options...
alexweber15 Posted October 30, 2008 Share Posted October 30, 2008 use utf8_decode() when inserting into mysql and utf8_decode() when retrieving from mysql ive found that regardless of db encoding and my page's encoding sometimes this goes wrong so for any data that might contain non alphanumeric characters (a-zA-z0-9) i suggest applying the above Quote Link to comment https://forums.phpfreaks.com/topic/130367-character-encoding-how-to-fix-funny-chars/#findComment-678018 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.