• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Boxes insted of Apostrophes - PLEASE HELP

New Here ,
May 01, 2007 May 01, 2007

Copy link to clipboard

Copied

I have a SIMPLE MS Access database entry for users to have a blog.

Fields are Title and Details


<cfquery name="read" datasource="#dsn#">
SELECT * from userblog
order by id desc
</cfquery>


<cfoutput query="read">
#title#
<br>
#details#
</cfoutput>


Sometimes when they put an apostrophe (ex: It's a cold day) in their
blog, it shows up as a box character/a little square on the site.


I have GOT to fix this issue! Please help.
TOPICS
Advanced techniques

Views

697

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 01, 2007 May 01, 2007

Copy link to clipboard

Copied

Choosing MS Access with Unicode in the Coldfusion Administrator might help.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 01, 2007 May 01, 2007

Copy link to clipboard

Copied

sanscls wrote:
> I have a SIMPLE MS Access database entry for users to have a blog.

what ver of cf? which acess driver?

> Sometimes when they put an apostrophe (ex: It's a cold day) in their
> blog, it shows up as a box character/a little square on the site.

boxes mean the currently selected font can't render that char. what encoding are
you using in your cf pages?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 02, 2007 May 02, 2007

Copy link to clipboard

Copied

PaulH

I don't have any specific encoding set. If that will fix my problem, please tell me how and where to put what. Im open to ANY help that will solve this problem. Thx Paul!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 02, 2007 May 02, 2007

Copy link to clipboard

Copied

sanscls wrote:
> I don't have any specific encoding set. If that will fix my problem, please

what ver of cf?

> tell me how and where to put what. Im open to ANY help that will solve this
> problem. Thx Paul!

if it's cf6/7 then:

(in your application.cfm)
<cfset setEncoding("url","utf-8")>
<cfset setEncoding("form","utf-8")>
<cfcontent type="text/html; charset=utf-8">

and at the top of all your cf pages add:
<cfprocessingdirective pageEncoding="utf-8">

you can also try other encodings iso-8859-1, windows-1252.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 02, 2007 May 02, 2007

Copy link to clipboard

Copied

PaulH

Thx, Paul. I have implemented those changes. I won't know if it works until the error occurs again, (I can't always replicate it), but I will look you up if I have an issue. You've been very helpful and EASY to understand. Thanks for your willingness to help out guys below your lvl!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 02, 2007 May 02, 2007

Copy link to clipboard

Copied

sanscls wrote:
> Thx, Paul. I have implemented those changes. I won't know if it works until
> the error occurs again, (I can't always replicate it), but I will look you up

i see. this could be the users copying/pasting text from a word processor. if
you don't care to exactly maintain the text, you might simply replace those
chars *before* you insert into the db. maybe using this might help:

http://www.cflib.org/udf.cfm?ID=725

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 02, 2007 May 02, 2007

Copy link to clipboard

Copied

PaulH

Actually I do have this on the page

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

Is there a better option???

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 10, 2007 May 10, 2007

Copy link to clipboard

Copied

That is just the Doc Type. Your encoding would something like this:

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

Unfortunately CF6 ignores that meta statement when submitting forms and uses
utf-8 even if you have a different encoding set in the meta. I thought it
had been fixed in CF7, but won't swear to it as I use utf-8 for everything.

--
Bryan Ashcraft (remove brain to reply)
Web Application Developer
Wright Medical Technology, Inc.
------------------------------------------------------------------
Macromedia Certified Dreamweaver Developer
Adobe Community Expert (DW) :: http://www.adobe.com/communities/experts/



"sanscls" <webforumsuser@macromedia.com> wrote in message
news:f1a743$b65$1@forums.macromedia.com...
> PaulH
>
> Actually I do have this on the page
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
>
> Is there a better option???


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 10, 2007 May 10, 2007

Copy link to clipboard

Copied

Bash - Adobe Community Expert wrote:

> Unfortunately CF6 ignores that meta statement when submitting forms and uses
> utf-8 even if you have a different encoding set in the meta. I thought it
> had been fixed in CF7, but won't swear to it as I use utf-8 for everything.

this has nothing to do w/the cf server. it doesn't parse HTML, just CFML. it's
for your browser, telling it what to do w/the data. there's nothing to "fix".


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 10, 2007 May 10, 2007

Copy link to clipboard

Copied

#Replace(Variable,"'","","ALL")#

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 11, 2007 May 11, 2007

Copy link to clipboard

Copied

LATEST
Perhaps I didn't explain what I meant very well. That, and I was backwards
( http://tinyurl.com/29p4rp)

--
Bryan Ashcraft (remove brain to reply)
Web Application Developer
Wright Medical Technology, Inc.
------------------------------------------------------------------
Macromedia Certified Dreamweaver Developer
Adobe Community Expert (DW) :: http://www.adobe.com/communities/experts/



"PaulH **AdobeCommunityExpert**" <paul@sustainableGIS.com> wrote in message
news:f1vfjg$jvb$1@forums.macromedia.com...
> Bash - Adobe Community Expert wrote:
>
>> Unfortunately CF6 ignores that meta statement when submitting forms and
>> uses utf-8 even if you have a different encoding set in the meta. I
>> thought it had been fixed in CF7, but won't swear to it as I use utf-8
>> for everything.
>
> this has nothing to do w/the cf server. it doesn't parse HTML, just CFML.
> it's for your browser, telling it what to do w/the data. there's nothing
> to "fix".
>
>


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation