Jump to content

mysql not accepting replaced 'smart quote' characters


rubing

Recommended Posts

I am processing a text file with php and then inserting it into my database.  This text file has some smart quotes:  e.g.

 

CheemoÂ’s Creation  BaileyÂ’s: 

Eric Mcginty  Barking Kudu: 

Lettin Go Live  BillyÂ’s:

 

 

which i execute a find and replace on:

 

$str = preg_replace('/[\x91\x92]/u', "'", $str);
$str = preg_replace('/[\x93\x94]/u', '"', $str);

 

If I echo these entries before insertion they look completely normal!  However, they refuse to be inserted.  Any advise from anybody.  thanks...really appreciate it!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.