French characters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I use PHP to read data form a mysql 5 table. allow the user to edit the data 
and then update the table.  I am having trouble with French characters.

Before the update:  Pas de description détaillée
After the update:    Pas de description détaillée

When I read from the table I wrap the data in the following:
    // Stripslashes
    if (!get_magic_quotes_gpc()) {
        $value = stripslashes($value);
    }
    // Convert all applicable characters to HTML entities
    $value = htmlentities($value,ENT_COMPAT);

When I update to the table, I wrap in the following:
    // Addslashes
    if (!(get_magic_quotes_gpc())) {
       $value = addslashes($value);
    }
    // Quote if not a number or a numeric string
    if (!is_numeric($value)) {
       $value = @mysql_real_escape_string($value);
    }

I've tried playing with character sets to no avail.  There mst be a 
solution,

Thanks
Don 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux