ŽĐŠĆČžđšćč »  Show posts from    to     

Icy Phoenix


Test Forum - ŽĐŠĆČžđšćč



Limun [ Tue 23 Oct, 2012 05:46 ]
Post subject: ŽĐŠĆČžđšćč
ćčšđžČĆŠĐŽ


mort [ Thu 25 Oct, 2012 03:35 ]
Post subject: Re: ŽĐŠĆČžđšćč
Just what I needed.

I'm testing some UTF8

And this:

ŽĐŠĆČžđšćč

Translates in the Db to this:

ćčšđžČĆŠĐŽ

And comes back as:

ŽĐŠĆČžđšćč

Does that look right to you?


TheSteffen [ Thu 25 Oct, 2012 10:00 ]
Post subject: Re: ŽĐŠĆČžđšćč
mort wrote: [View Post]
And this:

ŽĐŠĆČžđšćč

Translates in the Db to this:

ćčšđžČĆŠĐŽ

And comes back as:

ŽĐŠĆČžđšćč


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


mort [ Thu 25 Oct, 2012 10:36 ]
Post subject: Re: ŽĐŠĆČžđšćč
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

Code: [Hide] [Select]
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

Code: [Hide] [Select]
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:

Code: [Hide] [Select]
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!




Powered by Icy Phoenix