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

UTF-8 encoding characters

New Here ,
Dec 15, 2008 Dec 15, 2008
Hi everyone, I am new to coldfusion and need a bit of help here,
I created a .cfm and a .html with the exact same body content (Spanish words with accents), but when preview in the browser the .cfm version shows wierd characters even though both pages are charset=utf-8, is this a configuration issue that needs to be configured from the Coldfucion server admin properties? Like always thanks for the help.

CFM:
TOPICS
Getting started
804
Translate
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 ,
Dec 15, 2008 Dec 15, 2008
pixculim wrote:
> Hi everyone, I am new to coldfusion and need a bit of help here,
> I created a .cfm and a .html with the exact same body content (Spanish words

one of these things is not like the other.

> with accents), but when preview in the browser the .cfm version shows wierd
> characters even though both pages are charset=utf-8, is this a configuration

what version of cf? 6 & above default to utf-8, is that the actual encoding of
the cf page? setting the meta-header's not enough.

> <p>cotizaci?n, publicaci?n y ?bicaci?n</p>

if this is the actual cf code, your encoding is bad. it's not utf-8.
Translate
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 ,
Dec 16, 2008 Dec 16, 2008
Hi Paul thanks for your help, I am using CF7 on IIS 6, the way I created both codes listed on my original post is by clicking on New file on DW and selecting CFM and HTML file respectively from the DW splash window and then I added the 3 words with their accents (From design view). I have not moved or changed any encoding type.
Once again thanks for your help..
Sincerely,
Pixc.
Translate
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 ,
Dec 16, 2008 Dec 16, 2008
> words with their accents (From design view). I have not moved or changed any
> encoding type.

ok lets try this, use notepad to open the cf page. can you read the text? try as
"save as", what does the encoding at the bottom of the save dialog say?
Translate
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 ,
Dec 16, 2008 Dec 16, 2008
Hi Paul, with Notepad I can open the file and read it correctly like it is supposed to be as long as I chose UTF-8 as the encoding option within the notepads open window.

I have uploaded to our server the cfm file and the HTML files to a .zip file along with a screen shoot of the browser with both pages open if you want to take a look at them.

http://coralprincess.com/2009/encodingproblem.zip

Thanks for your help.
Translate
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 ,
Dec 16, 2008 Dec 16, 2008
LATEST
pixculim wrote:
> Hi Paul, with Notepad I can open the file and read it correctly like it is
> supposed to be as long as I chose UTF-8 as the encoding option within the
> notepads open window.

it appears that the cf file's missing a BOM. so either add one (in notepad use
the save as w/utf-8) or add

<cfprocessingdirective pageencoding="utf-8">

to the very top of that file. or if you're using application.cfm stick it in
there along w/setEncoding() to make sure all your text is seen as utf-8 encoded.
Translate
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