CFFILE and extended ASCII/accented characters

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default CFFILE and extended ASCII/accented characters

    Hello-
    I'm using CF 6.1 as a front-end to a MySQL database that happens to contain
    extended ASCII characters (e.g., accented vowels). CF displays the characters
    correctly onscreen, but if I use CFFILE to try to output to a file the
    characters are converted to something strange -- question marks or some other
    kind of extended character.

    In CF-Admin, I've set the connectionstring for the MySQL database to:
    useUnicode=true&characterEncoding=ISO-8859-1

    I've also created an Application.cfm file in the root directory of my CF
    application with the following contents:

    <cfapplication name="journalist_project">
    <cfcontent type="text/html; charset=ISO-8859-1">
    <cfscript>
    setencoding("form", "ISO-8859-1");
    setencoding("url", "ISO-8859-1");
    </cfscript>
    <cfprocessingdirective pageencoding="iso-8859-1">

    Any thoughts? Thanks in advance!

    - Tom Tedeschi


    tomtedeschi Guest

  2. Similar Questions and Discussions

    1. Accented characters in PHP code messed up
      Hi, I edit several PHP pages with Contrbute (since the first release) for my Web site. I found a problem lately. If I got accented characters in...
    2. MX and Panther: can't type accented characters
      SOS. I can't get a reply from Macromedia on this one: Under Panther OSX 10.3 in Director MX, you can't type in accented characters (such as...
    3. [PHP] HTML equivalents of accented characters
      Hello, This is a reply to an e-mail that you wrote on Mon, 11 Aug 2003 at 19:18, lines prefixed by '>' were originally written by you. sure...
    4. Trouble with extended ascii
      We are creating a project that will be used with Spanish, French and German alphabets. Since Director doesn't support unicode, we are using extended...
    5. extended ascii delimiters when when writing to outputstream
      Whenever I write to Response.Outputstream after doing a plain response.write, I get a delimiter between the two writes that is made up of three...
  3. #2

    Default Re: CFFILE and extended ASCII/accented characters

    while i don't think this is required, you might try adding a charset="iso-8859-1" to your cffile call.


    PaulH Guest

  4. #3

    Default Re: CFFILE and extended ASCII/accented characters

    Thanks for the quick reply, Paul. I forgot to mention that I did do that. The
    characters were encoded as some kind of unintelligable high-ASCII characters
    (ellipses, degree signs, etc.), but not as accented ones. I tried a number of
    different encodings in CFFILE, but the result was the same. Just to be sure, I
    then changed the code so that the output was to the screen rather than to the
    file, and all looked fine. Go figure.
    - Tom

    tomtedeschi Guest

  5. #4

    Default Re: CFFILE and extended ASCII/accented characters

    then i'll guess some kind of mysql monkey business maybe mangled the chars. can
    you put in fresh data & see?

    btw <cfprocessingdirective pageencoding="iso-8859-1"> has to go on each cf
    page it won't work from the application.cfm


    PaulH Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139