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

We need utf-8 BOM in *.cf* Files

New Here ,
Jul 14, 2009 Jul 14, 2009

Copy link to clipboard

Copied

In the Coldfusion8 Doc you can read:

Adobe recommends that you use BOM characters in your files.

(http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=i18n_10.html)

How can we change the encoding from utf-8 without BOM to utf-8 with BOM? I think it is an internal eclipse problem.

Does anyone know a goog solution for this problem?

TOPICS
Builder

Views

3.1K

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 ,
Oct 08, 2009 Oct 08, 2009

Copy link to clipboard

Copied

I try the new Beta2 and we have the same problem!

Does anyone know a good solution for this problem?

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 ,
Oct 08, 2009 Oct 08, 2009

Copy link to clipboard

Copied

The docs are talking nonsense: there's not need to specify a BOM.  Just set your default encoding to UTF-8.

If your CF templates have any non-ASCII characters in them, then tell the compiler to expect UTF-8 data using the <cfprocessingdirective> tag.

--

Adam

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 ,
Oct 08, 2009 Oct 08, 2009

Copy link to clipboard

Copied

Hello Adam

I think this is not a good solution. All of our current files uses UTF-8 BOM we don't want do change every file.

How can we change the default compiler behavor to recognize all files as UTF-8?

How can we change the default processingdirective?

Every good texteditor can add BOM to UTF-8 Files.

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 ,
Jan 06, 2010 Jan 06, 2010

Copy link to clipboard

Copied

push

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 ,
Jan 06, 2010 Jan 06, 2010

Copy link to clipboard

Copied

I don't see what your problem is here.

If you tell CFB to create new files as UTF-8, it will.  It does not put a BOM in the file, but the BOM is not necessary for the file to be recognised as UTF-8.  Equally, there is no problem if your files do have a BOM.

What actual problem are you having here?  Actual problem, not theoretical problem.  Why do you need there to be a BOM in the file?

--

Adam

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 ,
Jan 06, 2010 Jan 06, 2010

Copy link to clipboard

Copied

Also, have you raised an enhancement request for this (but you better provide a thorough rationale for it!):http://cfbugs.adobe.com/bugreport/flexbugui/cfbugtracker/main.html

--

Adam

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 05, 2010 May 05, 2010

Copy link to clipboard

Copied

I have the same problem !!!

In my case, we need to output chinese/japanese pages.

The CFB (ColdFusion Builder) do not write BOM to .cfm files, so it will display random code when we save>close>reopen it.

and also, CF server 8 do not display correct characters in web page.

But, if we reopen it and save it to UTF8 by notepad. (or by Dreamweaver with BOM checked)

it will display chinese/japanese normally.....

we don't want to re-save all files by notepad or other applications.

and for edit these files by CFB, I think the BOM function is necessary.

Adan wrote:

If you tell CFB to create new files as UTF-8, it will.  It does not put a BOM in the file, but the BOM is not necessary for the file to be recognised as UTF-8.  Equally, there is no problem if your files do have a BOM.

actually, the problem CFB create files as UTF-8 without BOM is we have no idea to edit a cfml include other language like chinese or japanese !!

how can we slove this problem?

(I know the BOM is not necessary for UTF-8. but if I want to edit a cfm with chinese characters inside, it seems to be necessary.)

(Sorry if I misspelled something, my native language is chinese.)

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
Enthusiast ,
May 05, 2010 May 05, 2010

Copy link to clipboard

Copied

the unicode spec says the BOM is optional for UTF-8 (which if you think about

it's not needed, there's only the 1 byte order for UTF-8). eclipse, which cf

builder (CFB), cfeclipse (CFE), et al is based on, doesn't write out a BOM.

i use thai, japanese, arabic, etc. in cf files edited w/CFB, CFE & even with

notepad (don't ask). all work fine.

are you sure your files are utf-8 encoded in the 1st place? can you zip up &

attach a simple example of one that's causing you problems?

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 06, 2010 May 06, 2010

Copy link to clipboard

Copied

LATEST

Thanks Paul,

it so strange...

since you made a response to me, I tried to install CFB on my home pc.

and it's just incredible work fine..    =  ="

I think the problem is on my work pc...........

I will try it tomorrow,

and thanks for your enthusiastic 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
Resources
Documentation