|
-
Dec 11th, 2007, 12:08 AM
#1
Thread Starter
Frenzied Member
mysql reject "funny hyphen"
Hi,
First off, this is not a problem on my local machine (winxp,php, mysql).
It's is a problem on the live server (win2k3server, php, mysql) and according to "select version();" I run the the same version of mysql on both machinces.
I created a data capturing page where I copy and paste data into from another partner site for the moment.
Note that i both tried addslashes and mysql_real_escape_string to deal with this.
I realized that allthought things work fine on my local machine, a mysql error occur when saving the same data to the live server.
After much debugging, I realized it's because of a hyphen looking character (but acutally nearly double as long as a normal hyphen), and tis' treated as an invalide character.
When I try do a strreplace in php (i edit in dreamweaver), and i copy the long hyphen thing into "$string = str_replace("–","-",$string);", it does not replace it. But even so, this will solve my problem with only one "strange" character...what about others that come up in the future?
I'm using php 5 and mysql 5.0.45-community nt
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|