RE: [PHP] French characters
| From: | Mert Oztekin | Date: | Mon, 19 Oct 2009 13:02:39 +0000 |
| Subject: | RE: [PHP] French characters | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-299042@lists.php.net to get a copy of this message | ||
What about browsers encoding? And also, does your html code has a header about character-encoding in
french
-----Original Message-----
From: Don [mailto:don@program-it.ca]
Sent: Monday, October 19, 2009 3:58 PM
To: php-general@lists.php.net
Subject: [PHP] French characters
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
________________________________
Bu mesaj ve ekleri, mesajda gönderildiği belirtilen kişi/kişilere özeldir ve gizlidir. Size
yanlışlıkla ulaşmışsa lütfen gönderen kisiyi bilgilendiriniz ve mesajı sisteminizden
siliniz. Mesaj ve eklerinin içeriği ile ilgili olarak şirketimizin herhangi bir hukuki
sorumluluğu bulunmamaktadır. Şirketimiz mesajın ve bilgilerinin size değişikliğe uğrayarak
veya geç ulaşmasından, bütünlüğünün ve gizliliğinin korunamamasından, virüs
içermesinden ve bilgisayar sisteminize verebileceği herhangi bir zarardan sorumlu tutulamaz.
This message and attachments are confidential and intended for the individual(s) stated in this
message. If you received this message in error, please immediately notify the sender and delete it
from your system. Our company has no legal responsibility for the contents of the message and its
attachments. Our company shall have no liability for any changes or late receiving, loss of
integrity and confidentiality, viruses and any damages caused in anyway to your computer system.