My users are finding that %uFFFD keeps getting inserted into our database?
What I can tell is when I start with a blank record, and create a record
My screen looks like this:
http://www.flickr.com/photos/16043917@N00/3886510557/in/set-72157622114799151/
What i typed is simply "this is a test this is a test"
that is 'this is a test' 3 spaces 'this is a test'
After grabbing the text from the CKEDITOR via:
var notes = CKEDITOR.instances['notes'].getData();
notes = encodeURIComponent(escape(notes)); // to escape odd characters, etc
new Ajax.Request("addTimelineData.php", {
parameters: "notes=" + notes + "&date=" + new_date + "&time=" + new_time,
onSuccess: busCal.addedTimelineData.bind(this),
onFailure: busCal.gotFailure.bind(this)
});
On the PHP side this is what I do:
$notes = htmlspecialchars(addslashes(rawurldecode(trim($_POST['notes']))));
then insert it in the database
Then when they try to "edit" that note again, this is what the screen looks like:
http://www.flickr.com/photos/16043917@N00/3886510593/in/set-72157622114799151/
and if they click the SAVE button it now sticks %uFFFD everywhere that funny question mark character is?
Any help/suggestions?
Thanks,
-David
Fri, 09/04/2009 - 16:33
#1
Re: %uFFFD odd characters appearing