Hi all!
I am having provlem storing special characters in to Database table.. I have a table named messages having following structure
MESSAGE_ID bigint(20)
Catagory_ID int(11)
Message text
The table Collation is "utf8_unicode_ci" and also the Message field's collation is "utf8_unicode_ci", but when I store a Message e.g.
but when I store any special character in Message field like “ and ` they are stored like %20xx etc etc.. and being displayed on HTML as %20xx etc.. whcih doesn't seem good.. Please help me out. how to solve this problem.. My Table storage engine is "InnoDB".. Please I need quick help..
Storing Special Characters in Table
Moderator: General Moderators
-
ummarbhutta
- Forum Newbie
- Posts: 9
- Joined: Sun Nov 23, 2008 7:12 am
Re: Storing Special Characters in Table
There are 10 types of people in this world, those who understand binary and those who don't
-
ummarbhutta
- Forum Newbie
- Posts: 9
- Joined: Sun Nov 23, 2008 7:12 am
Re: Storing Special Characters in Table
This is about URL Encode.. I am having problem storing it in DB? Will it solve the problem.. I think there is problem in Insert Query.. ?? Should I use some escape sequences?
Re: Storing Special Characters in Table
I think your $Message is URL encoded.
There are 10 types of people in this world, those who understand binary and those who don't
-
ummarbhutta
- Forum Newbie
- Posts: 9
- Joined: Sun Nov 23, 2008 7:12 am
Re: Storing Special Characters in Table
Ok I will try it.. you are saying that before storing in DB I should URL encode it?
Re: Storing Special Characters in Table
No, just the opposite - you should decode it.ummarbhutta wrote:Ok I will try it.. you are saying that before storing in DB I should URL encode it?
Code: Select all
$Message = mysql_real_escape_string(urldecode($Message));There are 10 types of people in this world, those who understand binary and those who don't