Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Random Question Marks in CKEditor... Where are they coming from???

Posted on 2015-01-06
3
Medium Priority
?
478 Views
Last Modified: 2015-01-14
We have a Coldfusion application that utilizes CKEditor.  We've found that when some users enter data, save their form, then come back into said form later, that the editor content in the saved draft form has random question marks.  I've created a user defined function that attempts to strip out any random question marks from the saved data before it is populated into the CKEditor instance when the draft form is reloaded.  My thought was that it might be an encoding issue, however, I've verified that nothing in the process is out of sync with UTF-8.  So, the question is, where do/does, the question marks/mark come from?

Below is a portion of the User Defined Function that strips out the question marks, which appear in pairs, or alone, typically proceeding a line break:
	// strip out random question marks
	text = replaceNoCase(text, '<br>??', '<br>', 'all');
	text = replaceNoCase(text, '<br />??', '<br />', 'all');
	text = replaceNoCase(text, '<br>?', '<br>', 'all');
	text = replaceNoCase(text, '<br />?', '<br />', 'all');
	text = replaceNoCase(text, '&nbsp;?', ' ', 'all');
	text = replaceNoCase(text, '%?', '%', 'all');
	text = replaceNoCase(text, '?%%', '%%', 'all');
	text = replaceNoCase(text, '??', '', 'all');

Open in new window


I'd feel much more comfortable with a legitimate fix than using the bandage that is currently in place.  Any insight is greatly appreciated.  Thanks in advance!

~Brian
0
Comment
Question by:brianmfalls
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 34

Accepted Solution

by:
Big Monty earned 1200 total points
ID: 40533468
this def sounds like an encoding issue, are you positive you have your encoding identified properly on the page? it would look something like:

<meta http-equiv=Content-Type content="text/html; charset=windows-1252">

if you're running Apache, edit your Apache configuration file  and comment-out the following line:

AddDefaultCharset UTF-8

Then restart Apache:

service httpd restart
0
 
LVL 52

Assisted Solution

by:_agx_
_agx_ earned 800 total points
ID: 40535787
(No points...)

Almost certainly an encoding issue.  

I've verified that nothing in the process is out of sync with UTF-8

Sounds like there are several steps involved. Can you post a small example of the submission + edit scripts that demonstrates the issue?

then come back into said form later, that the editor content in the saved draft form has random question marks

So it only occurs when displaying saved data? I assume you're storing the draft in a db table.  What is the data type of the column, and which dbms?
0
 
LVL 1

Author Closing Comment

by:brianmfalls
ID: 40548804
So... it turns out that there were files on the server that were not in svn, and there by not on my computer.  I got everything sync'd up and low and behold, there were quite a few meta tags setting the charset to iso-8859-1, which created an encoding conflict.  EVERYTHING is now set to UTF-8.  EVERYTHING.  Oddly enough, we haven't seen the random question marks sense.  Thanks for the input guys.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question