I was trying to save term with name "Big Honor for Branford's Le Petit Café" using taxonomy_term_save function which throws me the following error
PDOException: in drupal_write_record() in common.inc
Is it some thing related to character encoding ? should i have to convert the character? I am not sure how to do that.
Please find the code that throws the error,
$term_name = new stdClass(); $term_name->name = urldecode("Big%20Honor%20for%20Branford%27s%20Le%20Petit%20Caf%E9"); $term_name->vid = 1; taxonomy_term_save($term_name);
If we are using the exact "Big Honor for Branford's Le Petit Café" is a file then i could not get the error but, when url encoded and decoded again, we will have the same character set.