Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invalid Chars in String

Status
Not open for further replies.

Brianfree

Programmer
Feb 6, 2008
220
GB
Hi, i have data in a table which i am accessing via php into a drop down list.

This works ok however some data like "CITROËN" is coming back as "CITRO½N" and i cant post it as a form value.

Hope this makes sense.

Any ideas?

many thanks

brian


 
check the character encoding that your documents are using.
 
Cool!!

I have removed the following line..

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

However what should it be?

Many thanks.

Brian
 
i probably was not clear enough. you need to make sure that all storage areas are aware of your character set. this includes your table/database, the html you are outputting AND the database connection itself. the database stuff can be administered from phpmyadmin
 
The real solution is PHP 6 with "real" Unicode support. Nay?
 
No. The real solution is knowing what encodings are used and communicate that to all used subsystems. Sending a PHP6 unicode string after you have told the browser to expect iso-8859-1 still makes your site a mess.

In short: it is your responsibility as a programmer to manage the string encoding hat is used. No programming language can take that away from you.

+++ Despite being wrong in every important aspect, that is a very good analogy +++
Hex (in Darwin's Watch)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top