He has no utf-8 charset in the table, so the first point is valid and 
htmlentities is the function ( 
http://uk.php.net/manual/en/function.htmlentities.php )
You need to remember that in this way you need to use htmlentities for 
*everything*, specially for searches, otherwise ° against ° will be a "not 
found".

Alternative could be mb_string for charset manipulation but since the table is 
not UTF-8 you could have lots of problems with other chars ... so you change 
the charset if this is a new project before you gonna be in trouble for size 
and/or performances, or you convert each stored stirng via htmlentities and you 
start right now to use htmlentities as default select/insert "parser" (or you 
convert everything into utf-8 via mb_string and you truncate the table, change 
the charset, refill it via converted values performed into another table)

Regards

> From: a...@ashleysheridan.co.uk
> Two ways to do this:
> 
>      1. Insert the characters as their escaped HTML codes, e.g. °
>         ± £ (for °, ± and £)
>      2. Set the DB to use a utf8 character set, and insert the
>         characters directly as is, without escaping them

_________________________________________________________________
Share your memories online with anyone you want.
http://www.microsoft.com/middleeast/windows/windowslive/products/photos-share.aspx?tab=1

Reply via email to