2 Replies Latest reply on Jun 13, 2006 7:28 AM by manju thammaiah

    query return/wddx with white space

    manju thammaiah
      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.
        • 1. Re: query return/wddx with white space
          MikerRoo Level 1
          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.

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

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

          • 2. Re: query return/wddx with white space
            manju thammaiah Level 1
            it worked fine. thank you very much.