Professional Web Applications Themes

CFFILE and extended ASCII/accented characters - Coldfusion - Advanced Techniques

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; cht=ISO-8859-1"> <cfscript> setencoding("form", "ISO-8859-1"); setencoding("url", "ISO-8859-1"); </cfscript> <cfprocessingdirective pageencoding="iso-8859-1"> ...

  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; cht=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. #2

    Default Re: CFFILE and extended ASCII/accented characters

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


    PaulH Guest

  3. #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

  4. #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

Similar Threads

  1. Accented characters in PHP code messed up
    By PolyWebTech in forum Macromedia Contribute General Discussion
    Replies: 2
    Last Post: October 7th, 06:42 AM
  2. MX and Panther: can't type accented characters
    By djfilms@rogers.com in forum Macromedia Director Basics
    Replies: 0
    Last Post: April 2nd, 08:08 PM
  3. [PHP] HTML equivalents of accented characters
    By David Nicholson in forum PHP Development
    Replies: 5
    Last Post: August 14th, 02:05 PM
  4. Trouble with extended ascii
    By RobDennett webforumsuser@macromedia.com in forum Macromedia Director Lingo
    Replies: 0
    Last Post: July 26th, 10:01 PM
  5. Replies: 0
    Last Post: July 9th, 04:58 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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