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

query return/wddx with white space

Guest
Jun 12, 2006 Jun 12, 2006

Copy link to clipboard

Copied

i have a query return i am looking at which i will send it to another program but for some reason this is coming with some white space. i have following questions.
if i make changes on the admin console for white space management do i need to reboot.
i am trying to use cfsetting but it is still producing some white spaces at the beginging. when i see the source.
TOPICS
Advanced techniques

Views

239

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
Advisor ,
Jun 12, 2006 Jun 12, 2006

Copy link to clipboard

Copied

The CF admin setting helps but does not completely solve whitespace issues. (Look at the source for these forum pages, for example..)

Also, beware of people who tell you to strip the whitespace off after the fact by manipulating CF output as though it were a string.

Put this at the top of your Application.cfm or Application.cfc:
<CFSETTING EnableCFOutputOnly = "yes">

This means that nothing makes it to the page unless it is inside <CFOUTPUT> tags or in WriteOutput ().

This is good practice anyway because it encourages you to separate output code from logic and makes you more conscious of whitespace as you code.

Finally, for XML to some programs or the <DOCTTYPE> declaration to IE know that the output must be immediately after the first <CFOUTPUT> with no whitespace of any type.

IE:
<CFOUTPUT><?xml version="1.0" encoding="UTF-8"?>
...

works but
<CFOUTPUT>
<?xml version="1.0" encoding="UTF-8"?>
...

doesn't.

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
Guest
Jun 13, 2006 Jun 13, 2006

Copy link to clipboard

Copied

LATEST
it worked fine. thank you very much.

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