Ask a Question related to Macromedia ColdFusion, Design and Development.

  1. #1

    Default ASCII bug?

    mysql
    field.test="St. Patrick’s Day "
    ------------------------
    form.cfm:

    <cfquery name="getfield" datasource="database">
    select field from test limit 1
    </cfquery>
    <cfoutput query="getfield">
    <cfset value=field>
    </cfoutput>

    <form method="post" action="save.cfm">
    <cfoutput><input type="text" name="field" value="#value#"></cfoutput>
    <input type="submit" value="Save">
    </form>

    -------------------------------

    save.cfm:
    <cfoutput>
    #field#
    </cfoutput>

    ------------

    outputs:
    St. Patrick?s Day

    with quote being ASCII 8217 . If I insert that into mysql, mysql converts it
    to a space.


    :confused;

    tim_993 Guest

  2. Similar Questions and Discussions

    1. Non Ascii pathname
      When I try to open a .dcr file that has Japanese characters in the pathname IE seems to find it fine. But the ActiveX control seems to be unable to...
    2. string to ascii
      let's say I have a string say, "abcABC" how do I convert those 6 letters into their respective ASCII numbers, and if I have 6 ASCII numbers, how...
    3. using tr and ascii value
      I'm updating a process that reads in text file from a mainframe extract. The script reads and parses out this file and creates html documents from...
    4. Ascii to tif.
      AIX version 4.3.3 computer rs6000/f50 Is there a AIX/UNIX utility that will take an ASCII file and convert it to a TIF file?
  3. #2

    Default Re: ASCII bug?

    Hi

    use PreserveSingleQuotes when inserting the data into the table
    vkunirs Guest

  4. #3

    Default Re: ASCII bug?

    &#146 is the html code for right single quote (hex 92). the html equivelent of microsofts smart right single quote


    tim_993 Guest

  5. #4

    Default Re: ASCII bug?

    err, not sure where my last post went...


    PreserveSingleQuotes does not fix the problem
    tim_993 Guest

  6. #5

    Default Re: ASCII bug?

    This is probably related to the fact that the character that you are attempting
    to use is not an ASCII character, but extended ASCII. I'm sure that the driver
    that you are using between CF and MySQL doesn't "understand" what this
    character is, as its value is beyond ASCII, so it is making a substitution. I
    found a bug note on the MySQL site that you may want to take look at.

    [url]http://bugs.mysql.com/bug.php?id=7756[/url]

    Phil

    paross1 Guest

  7. #6

    Default Re: ASCII bug?

    Adding:
    useUnicode=true&characterEncoding=Cp1250

    to the connection string seemed to fix the problem.

    tim_993 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