Professional Web Applications Themes

accented characters, CF and SQL Server 2K - Macromedia ColdFusion

We have had a requirement from one of our clients to allow Czech characters within a site. We have made some changes to the site, and have turned the charCode into UTF-8, the database field into a ntext type, and have set the encodings on the site for form and URL to utf-8 as well using SetEncoding. When we enter the characters into the admin form, they are visible, when i submit them to the database and dump the result variable, i can see the special characters, if i perform a query straight after the insert the special characters have ...

  1. #1

    Default accented characters, CF and SQL Server 2K

    We have had a requirement from one of our clients to allow Czech characters
    within a site. We have made some changes to the site, and have turned the
    charCode into UTF-8, the database field into a ntext type, and have set the
    encodings on the site for form and URL to utf-8 as well using SetEncoding.

    When we enter the characters into the admin form, they are visible, when i
    submit them to the database and dump the result variable, i can see the special
    characters, if i perform a query straight after the insert the special
    characters have been replaced with their ISO equivilants. Uploading a C with a
    caron is replaced with a standard C. If we paste the information directly into
    the database, the characters are retained.

    Can anyone think of anything else that we can try?

    TIA

    Tony

    ThirdLion Guest

  2. #2

    Default Re: accented characters, CF and SQL Server 2K

    are you by any chance ripping these out when you display the data via soem filter? have a look at http://www.sustainablegis.com/unicode/greekTest.cfm & post the code (simplified) for the display page.
    PaulH Guest

  3. #3

    Default Re: accented characters, CF and SQL Server 2K

    Paul,

    This is weird. I've posted the characters onto that page you suggested and it
    worked. then viewed the source code and tried that locally and it didn't!

    When i look at the debug code the character is there in the form scope but
    isn't inserted into the database

    What database are you using?
    Is there anything special in the setup?

    TIA

    Tony

    ThirdLion Guest

  4. #4

    Default Re: accented characters, CF and SQL Server 2K

    that's sql server. nothing "special". what db are you using? what db driver? what datatypes are you using (ie do they support unicode)?
    PaulH Guest

  5. #5

    Default Re: accented characters, CF and SQL Server 2K

    Paul,

    My mistake, I removed the N from the query (thought it was a typo!). Is that
    something that is specific to SQL server ?

    just for info:
    We're using SQL server 2000, with a datatype of ntext.

    not sure of the version of the database driver, but we have applied the latest
    hotfixes from MM to the server.

    Tony

    ThirdLion Guest

  6. #6

    Default Re: accented characters, CF and SQL Server 2K

    yes it's important if you're not using
    http://www.sustainablegis.com/blog/cfg11n/index.cfm?mode=entry&entry=F9553D86-20
    ED-7DEE-2A913AFD8651643F in your sql. it's a unicode hint that tells sql server
    that the following text is unicode (N'unicode text in here'). for this you want
    to be using the JDBC driver (marked as ms sql server in cfadmin) not the
    ODBC/JDBC bridge.


    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

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