Home > Archive > PHP Language > October 2006 > utf-8 mysql htmlentities and forms
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
utf-8 mysql htmlentities and forms
|
|
|
| Hi, I have some trouwble with utf-8 mysql and php
I have the following setup
table text ->text varchar 255 -> utf-general-ci
ini_set('mbstring.internal_encoding','UTF-8');
ini_set('mbstring.http_input','UTF-8');
ini_set('mbstring.http_output','UTF-8');
ini_set('default_charset','UTF-8')
mysql_query("SET NAMES utf8");
INSERT INTO TABLE (text) VALUES('België')
// after retrieving data
echo $text;
->België
when I the do this
<textarea>htmlentities($text)<textarea>
->Belgi�«
INSERT INTO TABLE (text) VALUES('Belgi�« ')
// after retrieving data
echo $text;
->Belgi�«
O what can I do ??
| |
|
| Arjen schreef:
> Hi, I have some trouwble with utf-8 mysql and php
>
> I have the following setup
I figured it out ... sry !
htmlentities($text,ENT_QUOTES, 'utf-8')
Arjen
|
|
|
|
|