DAMMIT! I Can't upload any pics so I'll merge them and see if I can attach it.
TheSteffen wrote:
For me it is all the same: ŽĐŠĆČžđšćč
is in post and DB still ŽĐŠĆČžđšćč
all is utf-8_bin and DEFAULT COLLATE is also utf8_bin
Testet live on IP.de
That may be the case, but people are having problems with it.
So I think that
MG has unleashed a beast here.
This is the script I use
function clean($val){
$val = trim($val);
if(get_magic_quotes_gpc()) {
$val = stripslashes($val);
}
$val = strip_tags($val);
$val = htmlspecialchars($val, ENT_QUOTES,'UTF-8');
return mysql_real_escape_string($val);
}
And If I need ENT_NOQUOTES - - I use a different var.
Here's the DB Table which automatically appends utf8_general_ci
CREATE TABLE IF NOT EXISTS `gp_blogcomments` (
`commentid` int(11) NOT NULL AUTO_INCREMENT,
`blogentryid` int(11) NOT NULL,
`commenttitle` varchar(50) NOT NULL,
`commentbody` longtext NOT NULL,
`commenter` varchar(50) NOT NULL,
`commenterid` int(11) NOT NULL,
`commenterurl` varchar(50) NOT NULL,
`visible` tinyint(1) NOT NULL DEFAULT '0',
`commentdate` varchar(250) NOT NULL,
`ipaddress` text NOT NULL,
PRIMARY KEY (`commentid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
And the Magic is done here:
if($_POST['submit']){
$name = clean($_POST['name']);
$desc = clean($_POST['desc']);
Here's the rest of the results, and as one can see, there doesn't appear to be any problem - - - -
YET!
And @TheSteffan - If you give me some German I'll see if it handles the s and ss stuff - But the more you can give me the better the result will be.
Danke!
Description: |
|
Filesize: |
48.15 KB |
Viewed: |
265 Time(s) |

|