French characters
am 19.10.2009 14:57:53 von Don Proshetsky
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
RE: French characters
am 19.10.2009 15:02:39 von Mert Oztekin
--_000_E2C046087E10D943811A0BD0A4E8316D1BD2E81C0Eankaraanado lu_
Content-Type: text/plain; charset="iso-8859-9"
Content-Transfer-Encoding: quoted-printable
What about browsers encoding? And also, does your html code has a header ab=
out 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 dat=
a
and then update the table. I am having trouble with French characters.
Before the update: Pas de description d=E9taill=E9e
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 =3D stripslashes($value);
}
// Convert all applicable characters to HTML entities
$value =3D htmlentities($value,ENT_COMPAT);
When I update to the table, I wrap in the following:
// Addslashes
if (!(get_magic_quotes_gpc())) {
$value =3D addslashes($value);
}
// Quote if not a number or a numeric string
if (!is_numeric($value)) {
$value =3D @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=F0i belirtilen ki=FEi/ki=FEilere =
özeldir ve gizlidir. Size yanlýþl=FDkla ula=FEmýþsa lütfen gö=
nderen kisiyi bilgilendiriniz ve mesaj=FD sisteminizden siliniz. Mesaj ve e=
klerinin i=E7eri=F0i ile ilgili olarak =FEirketimizin herhangi bir hukuki s=
orumlulu=F0u bulunmamaktad=FDr. =DEirketimiz mesaj=FDn ve bilgilerinin size=
de=F0i=FEikli=F0e u=F0rayarak veya ge=E7 ula=FEmas=FDndan, bütünlü=
ðünün ve gizlili=F0inin korunamamas=FDndan, virüs i=E7ermesinden ve=
bilgisayar sisteminize verebilece=F0i herhangi bir zarardan sorumlu tutula=
maz.
This message and attachments are confidential and intended for the individu=
al(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 attachm=
ents. 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.
--_000_E2C046087E10D943811A0BD0A4E8316D1BD2E81C0Eankaraanado lu_--
Re: French characters
am 19.10.2009 15:08:27 von Don Proshetsky
I am using the following code:
"Mert Oztekin" wrote in message
news:E2C046087E10D943811A0BD0A4E8316D1BD2E81C0E@ankara.anado lusigorta.pvt...
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.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: French characters
am 19.10.2009 15:13:57 von Mert Oztekin
--_000_E2C046087E10D943811A0BD0A4E8316D1BD2E81C11ankaraanado lu_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
You may use UTF-8 both in your code and database. It is used more commonly.=
(almost seems to become a encoding standart)
-----Original Message-----
From: Don [mailto:don@program-it.ca]
Sent: Monday, October 19, 2009 4:08 PM
To: php-general@lists.php.net
Subject: Re: [PHP] French characters
I am using the following code:
1" />
"Mert Oztekin" wrote in message
news:E2C046087E10D943811A0BD0A4E8316D1BD2E81C0E@ankara.anado lusigorta.pvt..=
..
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 dat=
a
and then update the table. I am having trouble with French characters.
Before the update: Pas de description d=E9taill=E9e
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 =3D stripslashes($value);
}
// Convert all applicable characters to HTML entities
$value =3D htmlentities($value,ENT_COMPAT);
When I update to the table, I wrap in the following:
// Addslashes
if (!(get_magic_quotes_gpc())) {
$value =3D addslashes($value);
}
// Quote if not a number or a numeric string
if (!is_numeric($value)) {
$value =3D @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=F0i belirtilen ki=FEi/ki=FEilere =
özeldir ve
gizlidir. Size yanlýþl=FDkla ula=FEmýþsa lütfen gönderen kisiyi=
bilgilendiriniz
ve mesaj=FD sisteminizden siliniz. Mesaj ve eklerinin i=E7eri=F0i ile ilgil=
i
olarak =FEirketimizin herhangi bir hukuki sorumlulu=F0u bulunmamaktad=FDr.
=DEirketimiz mesaj=FDn ve bilgilerinin size de=F0i=FEikli=F0e u=F0rayarak v=
eya ge=E7
ula=FEmas=FDndan, bütünlüðünün ve gizlili=F0inin korunamamas=FD=
ndan, virüs
i=E7ermesinden ve bilgisayar sisteminize verebilece=F0i herhangi bir zarard=
an
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.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
________________________________
Bu mesaj ve ekleri, mesajda gönderildigi belirtilen kisi/kisilere özeld=
ir ve gizlidir. Size yanlislikla ulasmissa lütfen gönderen kisiyi bilgi=
lendiriniz ve mesaji sisteminizden siliniz. Mesaj ve eklerinin i=E7erigi il=
e ilgili olarak sirketimizin herhangi bir hukuki sorumlulugu bulunmamaktadi=
r. Sirketimiz mesajin ve bilgilerinin size degisiklige ugrayarak veya ge=E7=
ulasmasindan, bütünlügünün ve gizliliginin korunamamasindan, vir=
üs i=E7ermesinden ve bilgisayar sisteminize verebilecegi herhangi bir zar=
ardan sorumlu tutulamaz.
This message and attachments are confidential and intended for the individu=
al(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 attachm=
ents. 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.
--_000_E2C046087E10D943811A0BD0A4E8316D1BD2E81C11ankaraanado lu_--
Re: French characters
am 19.10.2009 15:22:17 von Don Proshetsky
------=_NextPart_000_006A_01CA509D.A6C9A1C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Thanks. For the database, there are many UTF8 collations. Is this the =
recommended one?
UTF8_unicode-ci?
----- Original Message -----=20
From: Mert Oztekin=20
To: 'Don' ; php-general@lists.php.net=20
Sent: Monday, October 19, 2009 9:13 AM
Subject: RE: [PHP] French characters
You may use UTF-8 both in your code and database. It is used more =
commonly. (almost seems to become a encoding standart)
-----Original Message-----
From: Don [mailto:don@program-it.ca]=20
Sent: Monday, October 19, 2009 4:08 PM
To: php-general@lists.php.net
Subject: Re: [PHP] French characters
I am using the following code:
charset=3Diso-8859-1" />
"Mert Oztekin" wrote in message=20
=
news:E2C046087E10D943811A0BD0A4E8316D1BD2E81C0E@ankara.anado lusigorta.pvt=
....
What about browsers encoding? And also, does your html code has a =
header=20
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=E9taill=E9e
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 =3D stripslashes($value);
}
// Convert all applicable characters to HTML entities
$value =3D htmlentities($value,ENT_COMPAT);
When I update to the table, I wrap in the following:
// Addslashes
if (!(get_magic_quotes_gpc())) {
$value =3D addslashes($value);
}
// Quote if not a number or a numeric string
if (!is_numeric($value)) {
$value =3D @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=F0i belirtilen =
ki=FEi/ki=FEilere özeldir ve=20
gizlidir. Size yanlýþl=FDkla ula=FEmýþsa lütfen gönderen =
kisiyi bilgilendiriniz=20
ve mesaj=FD sisteminizden siliniz. Mesaj ve eklerinin i=E7eri=F0i ile =
ilgili=20
olarak =FEirketimizin herhangi bir hukuki sorumlulu=F0u =
bulunmamaktad=FDr.=20
=DEirketimiz mesaj=FDn ve bilgilerinin size de=F0i=FEikli=F0e =
u=F0rayarak veya geç
ula=FEmas=FDndan, bütünlüðünün ve gizlili=F0inin =
korunamamas=FDndan, virüs=20
i=E7ermesinden ve bilgisayar sisteminize verebilece=F0i herhangi bir =
zarardan=20
sorumlu tutulamaz.
This message and attachments are confidential and intended for the=20
individual(s) stated in this message. If you received this message in =
error,=20
please immediately notify the sender and delete it from your system. =
Our=20
company has no legal responsibility for the contents of the message =
and its=20
attachments. Our company shall have no liability for any changes or =
late=20
receiving, loss of integrity and confidentiality, viruses and any =
damages=20
caused in anyway to your computer system.
--=20
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
________________________________ =20
Bu mesaj ve ekleri, mesajda gönderildigi belirtilen kisi/kisilere =
özeldir ve gizlidir. Size yanlislikla ulasmissa lütfen gönderen =
kisiyi bilgilendiriniz ve mesaji sisteminizden siliniz. Mesaj ve =
eklerinin i=E7erigi ile ilgili olarak sirketimizin herhangi bir hukuki =
sorumlulugu bulunmamaktadir. Sirketimiz mesajin ve bilgilerinin size =
degisiklige ugrayarak veya ge=E7 ulasmasindan, bütünlügünün ve =
gizliliginin korunamamasindan, virüs i=E7ermesinden ve bilgisayar =
sisteminize verebilecegi 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.
------=_NextPart_000_006A_01CA509D.A6C9A1C0--
Re: French characters
am 19.10.2009 15:26:44 von Robert Cummings
Don wrote:
> I am using the following code:
>
Ther emaybe something else setting the charset though. I find the
easiest way to check the actual charset that the browser thinks you are
using is to open up firefox and go to:
Tools -> Page Info
There you will see the charset type that the browser has found. From
what you've shown, either your displaying iso-8859-1 in a UTF-8 context
or UTF-8 characters in a iso-8859-1 context. Don't forget to check the
following setting in your php.ini:
default_charset
Personally, I try to use UTF-8 for everything these days since
iso-8859-1 is inferior to UTF-8. I would say the Internet at large is
moving in this direction... though it still boggles my mind how well
Microsoft buggers this up in IE (stuff like displaying a UTF-8 page but
completely kludging a download filename which it expects in latin1
despite the presence of the content type -- or having a mailto URL in a
UTF-8 context which pops open the Outlook mail client using latin1
assumption for the pre-populated subject line).
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: French characters
am 19.10.2009 15:29:09 von Don Proshetsky
This doesn't not seem to be having an affect as the French characters are
still written scrambled.
"Mert Oztekin" wrote in message
news:E2C046087E10D943811A0BD0A4E8316D1BD2E81C11@ankara.anado lusigorta.pvt...
You may use UTF-8 both in your code and database. It is used more commonly.
(almost seems to become a encoding standart)
-----Original Message-----
From: Don [mailto:don@program-it.ca]
Sent: Monday, October 19, 2009 4:08 PM
To: php-general@lists.php.net
Subject: Re: [PHP] French characters
I am using the following code:
"Mert Oztekin" wrote in message
news:E2C046087E10D943811A0BD0A4E8316D1BD2E81C0E@ankara.anado lusigorta.pvt...
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.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
________________________________
Bu mesaj ve ekleri, mesajda gönderildigi belirtilen kisi/kisilere özeldir ve
gizlidir. Size yanlislikla ulasmissa lütfen gönderen kisiyi bilgilendiriniz
ve mesaji sisteminizden siliniz. Mesaj ve eklerinin içerigi ile ilgili
olarak sirketimizin herhangi bir hukuki sorumlulugu bulunmamaktadir.
Sirketimiz mesajin ve bilgilerinin size degisiklige ugrayarak veya geç
ulasmasindan, bütünlügünün ve gizliliginin korunamamasindan, virüs
içermesinden ve bilgisayar sisteminize verebilecegi 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.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: French characters
am 19.10.2009 15:33:14 von Phpster
On Oct 19, 2009, at 9:29 AM, "Don" wrote:
> This doesn't not seem to be having an affect as the French =20
> characters are
> still written scrambled.
>
> "Mert Oztekin" wrote in message
> news:E2C046087E10D943811A0BD0A4E8316D1BD2E81C11@=20
> ankara.anadolusigorta.pvt...
> You may use UTF-8 both in your code and database. It is used more =20
> commonly.
> (almost seems to become a encoding standart)
>
> -----Original Message-----
> From: Don [mailto:don@program-it.ca]
> Sent: Monday, October 19, 2009 4:08 PM
> To: php-general@lists.php.net
> Subject: Re: [PHP] French characters
>
> I am using the following code:
>
> charset=3Diso-8859-1" />
>
>
> "Mert Oztekin" wrote in message
> news:E2C046087E10D943811A0BD0A4E8316D1BD2E81C0E@=20
> ankara.anadolusigorta.pvt...
> What about browsers encoding? And also, does your html code has a =20
> 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 =20=
> the data
> and then update the table. I am having trouble with French =20
> 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 =3D stripslashes($value);
> }
> // Convert all applicable characters to HTML entities
> $value =3D htmlentities($value,ENT_COMPAT);
>
> When I update to the table, I wrap in the following:
> // Addslashes
> if (!(get_magic_quotes_gpc())) {
> $value =3D addslashes($value);
> }
> // Quote if not a number or a numeric string
> if (!is_numeric($value)) {
> $value =3D @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 =20
> özeldir ve
> gizlidir. Size yanlýþlýkla ulaþmýþsa =
lütfen gönderen kisiyi =20
> bilgilendiriniz
> ve mesajý sisteminizden siliniz. Mesaj ve eklerinin içerið=
i ile =20
> ilgili
> olarak þirketimizin herhangi bir hukuki sorumluluðu =
bulunmamaktadý=20
> r.
> Ãirketimiz mesajýn ve bilgilerinin size deðiþikli=C3=
°e uðrayarak =20
> veya geç
> ulaþmasýndan, bütünlüðünün ve =
gizliliðinin =20
> korunamamasýndan, virüs
> içermesinden ve bilgisayar sisteminize verebileceði herhangi =
bir zar=20
> ardan
> sorumlu tutulamaz.
>
> This message and attachments are confidential and intended for the
> individual(s) stated in this message. If you received this message =20
> in error,
> please immediately notify the sender and delete it from your system. =20=
> Our
> company has no legal responsibility for the contents of the message =20=
> and its
> attachments. Our company shall have no liability for any changes or =20=
> late
> receiving, loss of integrity and confidentiality, viruses and any =20
> damages
> caused in anyway to your computer system.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> ________________________________
> Bu mesaj ve ekleri, mesajda gönderildigi belirtilen kisi/kisilere =
öz=20
> eldir ve
> gizlidir. Size yanlislikla ulasmissa lütfen gönderen kisiyi =
bilgilen=20
> diriniz
> ve mesaji sisteminizden siliniz. Mesaj ve eklerinin içerigi ile =
ilgi=20
> li
> olarak sirketimizin herhangi bir hukuki sorumlulugu bulunmamaktadir.
> Sirketimiz mesajin ve bilgilerinin size degisiklige ugrayarak veya g=20=
> eç
> ulasmasindan, bütünlügünün ve gizliliginin =
korunamamasindan, vir=20
> üs
> içermesinden ve bilgisayar sisteminize verebilecegi herhangi bir =
zar=20
> ardan
> sorumlu tutulamaz.
>
> This message and attachments are confidential and intended for the
> individual(s) stated in this message. If you received this message =20
> in error,
> please immediately notify the sender and delete it from your system. =20=
> Our
> company has no legal responsibility for the contents of the message =20=
> and its
> attachments. Our company shall have no liability for any changes or =20=
> late
> receiving, loss of integrity and confidentiality, viruses and any =20
> damages
> caused in anyway to your computer system.
>
>
>
> --=20
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
You've used htmlentities to encode the characters, try =
http://php.net/manual/en/function.html-entity-decode.php=20
to decode the string
Bastien=
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: French characters
am 19.10.2009 15:47:56 von Don Proshetsky
----- Original Message -----
From: "Phpster"
To: "Don"
Cc:
Sent: Monday, October 19, 2009 9:33 AM
Subject: Re: [PHP] French characters
On Oct 19, 2009, at 9:29 AM, "Don" wrote:
> This doesn't not seem to be having an affect as the French characters are
> still written scrambled.
>
> "Mert Oztekin" wrote in message
> news:E2C046087E10D943811A0BD0A4E8316D1BD2E81C11@
> ankara.anadolusigorta.pvt...
> You may use UTF-8 both in your code and database. It is used more
> commonly.
> (almost seems to become a encoding standart)
>
> -----Original Message-----
> From: Don [mailto:don@program-it.ca]
> Sent: Monday, October 19, 2009 4:08 PM
> To: php-general@lists.php.net
> Subject: Re: [PHP] French characters
>
> I am using the following code:
>
> />
>
>
> "Mert Oztekin" wrote in message
> news:E2C046087E10D943811A0BD0A4E8316D1BD2E81C0E@
> ankara.anadolusigorta.pvt...
> 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 zar ardan
> 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.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> ________________________________
> Bu mesaj ve ekleri, mesajda gönderildigi belirtilen kisi/kisilere öz eldir
> ve
> gizlidir. Size yanlislikla ulasmissa lütfen gönderen kisiyi bilgilen
> diriniz
> ve mesaji sisteminizden siliniz. Mesaj ve eklerinin içerigi ile ilgi li
> olarak sirketimizin herhangi bir hukuki sorumlulugu bulunmamaktadir.
> Sirketimiz mesajin ve bilgilerinin size degisiklige ugrayarak veya g eç
> ulasmasindan, bütünlügünün ve gizliliginin korunamamasindan, vir üs
> içermesinden ve bilgisayar sisteminize verebilecegi herhangi bir zar ardan
> 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.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
You've used htmlentities to encode the characters, try
http://php.net/manual/en/function.html-entity-decode.php
to decode the string
Bastien=
Do you mean like this?
> 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);
> }
> $value = html_entity_decode($value,ENT_COMPAT);
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: French characters
am 19.10.2009 16:04:15 von Don Proshetsky
"Phpster" wrote in message
news:587E29A7-9904-45F2-BEB3-B818ED0CAE25@gmail.com...
On Oct 19, 2009, at 9:29 AM, "Don" wrote:
> This doesn't not seem to be having an affect as the French characters are
> still written scrambled.
>
> "Mert Oztekin" wrote in message
> news:E2C046087E10D943811A0BD0A4E8316D1BD2E81C11@
> ankara.anadolusigorta.pvt...
> You may use UTF-8 both in your code and database. It is used more
> commonly.
> (almost seems to become a encoding standart)
>
> -----Original Message-----
> From: Don [mailto:don@program-it.ca]
> Sent: Monday, October 19, 2009 4:08 PM
> To: php-general@lists.php.net
> Subject: Re: [PHP] French characters
>
> I am using the following code:
>
> />
>
>
> "Mert Oztekin" wrote in message
> news:E2C046087E10D943811A0BD0A4E8316D1BD2E81C0E@
> ankara.anadolusigorta.pvt...
> 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 zar ardan
> 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.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> ________________________________
> Bu mesaj ve ekleri, mesajda gönderildigi belirtilen kisi/kisilere öz eldir
> ve
> gizlidir. Size yanlislikla ulasmissa lütfen gönderen kisiyi bilgilen
> diriniz
> ve mesaji sisteminizden siliniz. Mesaj ve eklerinin içerigi ile ilgi li
> olarak sirketimizin herhangi bir hukuki sorumlulugu bulunmamaktadir.
> Sirketimiz mesajin ve bilgilerinin size degisiklige ugrayarak veya g eç
> ulasmasindan, bütünlügünün ve gizliliginin korunamamasindan, vir üs
> içermesinden ve bilgisayar sisteminize verebilecegi herhangi bir zar ardan
> 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.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
You've used htmlentities to encode the characters, try
http://php.net/manual/en/function.html-entity-decode.php
to decode the string
Tries it but no affect. Thanks anyways
Bastien=
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: French characters
am 19.10.2009 18:42:43 von Skylinux
> Don wrote:
>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
It is an encoding problem.
My Thunderbird is set to use UTF-8 by default so the first line (Before
the update:) does not display the sentence properly. It contains ? marks
where the French character should be. The second line on the other hand
displays the way it should be (AFAIK remember from school :) .
So change your html encoding to utf-8 and it should work
Also ensure that your tables are utf8 and the mysql connection talks
utf8 by adding running the query SET NAMES 'utf8' after creating the
connection.
Like so:
$conn = mysql_connect($server,$username,$password);
mysql_query("SET NAMES 'utf8'", $conn);
mysql_select_db($database, $conn)
This page has a few pointers about switching a MySQL database to UTF-8.
Might be worth a quick look
http://www.network-technologies.org/tiny.php?id=9
--
John
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php