Solved

wierd output after writing apostrophes to the database

Posted on 2003-12-04
2
229 Views
Last Modified: 2013-12-24
i have an ACTIVEDIT WYSIYIG editor for people to use to put large amounts of HTMLtext and i write this information into a database.  on the website, i pull the information out from the database and the apostrophoes (single quotes) and quotations (double quotes) have become squares like this  after i finish writing to the database.  the information is stored as squares in the database itself.  does anyone know why and how to fix it?

in addition, most people copy the text from a word document or something to that effect and sometimes the quotes get converted to HTML code and sometimes it just stays as the squares.  are these a special code or character?
0
Comment
Question by:happydog234
[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
2 Comments
 
LVL 17

Expert Comment

by:anandkp
ID: 9880040
hmm common problem with most sites !

see if cfqueryparam can help u out in this - as it solves most of the " quotes " related problems.

also try & change the character lang set for ur DB - so it can take in "most" of the special characters & avoid those squares coming up !

with word it may be unavoidable in some cases ...

K'Rgds
Anand
0
 
LVL 1

Accepted Solution

by:
orangachang earned 500 total points
ID: 9905370
I've tried to solve this by converting the smart qoutes to regular CHR(34).  I find this happens when users copy & paste from MS-Word.

The following code is from a custom tag I wrote specifically for this:

<cfscript>
data = ReplaceNoCase(data,"&##x93;","&quot;","ALL");
data = ReplaceNoCase(data,"&ldquo;","&quot;","ALL");
data = ReplaceNoCase(data,"&lsquo;","'","ALL");
data = ReplaceNoCase(data,"&##x94;","&quot;","ALL");
data = ReplaceNoCase(data,"&rdquo;","&quot;","ALL");
data = ReplaceNoCase(data,"&rsquo;","'","ALL");
data = ReplaceNoCase(data,"&##x91;","'","ALL");
data = ReplaceNoCase(data,"&##x92;","'","ALL");
data = ReplaceNoCase(data,"&##x96;","-","ALL");
data = ReplaceNoCase(data,"&ndash;","-","ALL");
data = ReplaceNoCase(data,"“","&quot;","ALL");
data = ReplaceNoCase(data,"”","&quot;","ALL");
data = ReplaceNoCase(data,"‘","'","ALL");
data = ReplaceNoCase(data,"’","'","ALL");
data = ReplaceNoCase(data,"–","-","ALL");
</cfscript>
0

Featured Post

Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

Question has a verified solution.

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

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

617 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