MySQL Forums
Forum List  »  PHP

Mystery of string truncated after foreign char!
Posted by: mysql
Date: July 11, 2005 02:39AM

I execute a simple insert, with a few characters in French, and the string gets truncated. What is worse, and even more mystifying, is that the query works if I do it directly (in, say, phpMyAdmin.).

The following code inserts only "World/Fran".

Please help! This is driving me nuts! Thanks.

<?

/**
CREATE TABLE `catmv` (
`oldtopic` varchar(85) NOT NULL default '',
`newtopic` varchar(85) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
**/

$conn = mysql_connect("localhost", "root", "mypassword");
mysql_select_db("dwodp", $conn);

$sql="INSERT INTO catmv (oldtopic, newtopic)
VALUES('World/Français/Régional/Europe/Suisse/Enseignement_et_formation/Langues', 'World/Français/Régional/Europe/Suisse/Enseignement_et_formation/Disciplines/Langues')";
echo "sql=$sql<br><br>";
mysql_query($sql);

echo "Finished.";

?>

Options: ReplyQuote


Subject
Written By
Posted
Mystery of string truncated after foreign char!
July 11, 2005 02:39AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.