Re: convert special characters.

Karl DeSaulniers <[email protected]>
Newsgroups gmane.comp.php.database
Message-ID <[email protected]>
On Aug 9, 2012, at 5:37 AM, Karl DeSaulniers wrote:

> Help!
>
> How do I get special characters to convert correctly when inserting  
> and reading from my database.
> For example.
>
> é => &eacute;
> ë => &euml;
>
> I keep getting
>
> ë and é
>
> using htmlentities, htmlspecialchars, etc...
>
> Any pointers? Please!
> Going bald over here.
>
> here is my funcitons
>
> function stringToMysqlFormat($original_input) {
>               //for inserting the data with special characters INTO  
> mysql
>               $html_encoded =  
> htmlentities(mysql_real_escape_string($original_input));
>               return $html_encoded;
> }
> function mysqlToHTMLFormat($encoded) {
>               //for displaying the data FROM mysql
>               $html_decoded =  
> html_entity_decode(stripslashes($encoded));
>               return $html_decoded;
> }
>
> TIA,
>
> Karl DeSaulniers
> Design Drumm
> http://designdrumm.com
>


using UTF-8


Karl DeSaulniers
Design Drumm
http://designdrumm.com


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.