oMIKEo Posted April 12, 2006 Share Posted April 12, 2006 Hi,Ive been importing all the records for a clients site into my database and ive just exported and then imported them into the clients database but its not working very well... Its adding things like don’t when it should be a ' Any ideas if i can easily solve this?Thanks, Mike Link to comment https://forums.phpfreaks.com/topic/7217-importing-issue-%C3%A2%E2%82%AC%E2%84%A2/ Share on other sites More sharing options...
kenrbnsn Posted April 12, 2006 Share Posted April 12, 2006 Is the data being stored via Microsoft word? If so, what looks like a simple quote ( ' ) really isn't one. Ken Link to comment https://forums.phpfreaks.com/topic/7217-importing-issue-%C3%A2%E2%82%AC%E2%84%A2/#findComment-26271 Share on other sites More sharing options...
oMIKEo Posted April 12, 2006 Author Share Posted April 12, 2006 The data was originally in MS Word then pasted into my database via phpmyadmin.From that the tables and data were extracted as a .sql file and imported into the clients database, again via phpmyadmin.Any ideas how to fix the problem of those special characters.Thanks Link to comment https://forums.phpfreaks.com/topic/7217-importing-issue-%C3%A2%E2%82%AC%E2%84%A2/#findComment-26278 Share on other sites More sharing options...
kenrbnsn Posted April 12, 2006 Share Posted April 12, 2006 I found this solution on another PHP email list I'm on:[code]<?php $search = array( '/[\x07\x95]/', '/\x85/', '/[\x91\x92]/', '/[\x93\x94]/', ); $replace = array( '-', '...', '\'', '"', ); $data = preg_replace($search, $replace, $data);?>[/code]Ken Link to comment https://forums.phpfreaks.com/topic/7217-importing-issue-%C3%A2%E2%82%AC%E2%84%A2/#findComment-26298 Share on other sites More sharing options...
oMIKEo Posted April 12, 2006 Author Share Posted April 12, 2006 Thanks,Problem Fixed :)Mike Link to comment https://forums.phpfreaks.com/topic/7217-importing-issue-%C3%A2%E2%82%AC%E2%84%A2/#findComment-26303 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.