ŽĐŠĆČžđšćč


Subject: ŽĐŠĆČžđšćč
ćčšđžČĆŠĐŽ

Subject: Re: ŽĐŠĆČžđšćč
Just what I needed. :mrgreen:

I'm testing some UTF8

And this:

ŽĐŠĆČžđšćč

Translates in the Db to this:

ćčšđžČĆŠĐŽ

And comes back as:

ŽĐŠĆČžđšćč

Does that look right to you? :LOL:

Profile PM  
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

Profile PM  
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. :mricy:

This is the script I use

Code: [Download] [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: [Download] [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: [Download] [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! :LOL:

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!


4.jpg
Description:  
Filesize: 48.15 KB
Viewed: 293 Time(s)

4.jpg


Profile PM  

Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.09s (PHP: 20% SQL: 80%)
SQL queries: 12 - Debug Off - GZIP Enabled