Skip to main content
New Participant
May 3, 2009
Question

Strange Umlaut(vowel mutation) behavior with CF 801

  • May 3, 2009
  • 3 replies
  • 1066 views

Hi,

I have set up two identical Servers. Both are Running Window Server 2003 R2 with IIS6.0 and ColdFusion 8.01.

I replicated all Data(My CF Script and the Database-File which is Access) from the first Server to the second Server.

The Script works fine one the First server, but not on the second.

Example:

I want to save a customer Object to the Database and I use an "ü" in the text-attribute "street", it's replaced in the Database with "ü".

With another Script for the same Project it is saved as " F FFFFFC". Edit:(This hex-like Code has a leading character like an 0 with 8 strokes arround it(like a sun)).

This is really strange because the first server doesn't have these Problems, even though it is running the same Server Softwareand and exactly the same cfm and mdb files as the second one.

Additional Information:

I have placed <cfset SetEncoding("form", "UTF-8") /> in Application.cfm of the first Script.

I couldn't find any differences in the configurations of IIS or CDAdmin on both Machines. But there are a lot of options.

May be I wasn't looking at the right place.

Thanks for your help (in advance)

Greetings from Germany,

Malte

    This topic has been closed for replies.

    3 replies

    CFHusenAuthor
    New Participant
    May 3, 2009

    @craigkaminsky:

    1) The umlaut is directly typed into the form input.

    2) There are two scripts that are installed an each server. The first one, that uses the SetEncode() Function, is a browser based Interface for quick usage, the set Endcoding was neccessary to get the right character after the http post.

    The second script is only a data backend for a c++ frontend which is a little bit more comfortable. This script always worked without calling SetEncoding().

    3) Both 2k3 installations are in german language, both were installed from the same Harddisk-image file. So the 2k3 and IIS are the same Versions and builts.

    The Databasefile is simple. Im saving into a table called user. There are fields like gender, title, firstname, lastname, street, city of type text und the have Access' defaults Attribute Settings. I downloaded the DB File from the Server that works correctly, deleted the old data and uploaded it to the new server. I transfered the cfm files directly from server 1 to server b.

    @PaulH:

    Yup, its MS Access. I tried to reconnect the Databasefile with the MS Acces with Unicode Driver, but I got SQL Errors at the first query instantly.

    I think I'd have to save the Access File with a Unicode Option, I can check this tomorrow when I'm back in the Office.

    But I never had Umlautproblems with ColdFusion and Access and I had a couple Projects like that since Allaire 4.5.

    Everyone tells me not to use Access(and I think for reason), but it was very suitable so far.

    In General:

    I just recognized that if I enter "Müller" to the field 'lastname'  the Formaction-page already returns "Müller" when I'm using <cfoutput>#form.lastname#</cfoutput>. So the Problem isn't database related. I tested on the script that uses <cfset SetEncoding("form", "UTF-8") /> in the Application.cfm.

    Thanks so far.

    Greetings

    Inspiring
    May 3, 2009

    prior to version 6 cf never cared about encoding, after that it did. cf defaults

    to utf-8. unless you change the server's default encoding or use

    cfProcessingDirective you'll have to make sure your database, cf page encoding,

    etc. are all utf-8.

    if the data is mojibake w/out db interaction then it's a "simple" encoding

    problem (though make sure about the access unicode bits anyway). double check

    the pages on the non-working server--if you have access to the server, check

    what encoding it's using in cf_root/lib/neo-runtime.xml file, look for the bit

    about 'defaultCharset'.

    if possible, seeing the actual form/result page & their code might help.

    Inspiring
    May 3, 2009

    obviously the two servers are not exactly the same.

    can i guess by "MDB" that you're using access? if so, can you check if the

    working server is using "access for unicode" db driver vs what the non-working

    server's db driver? i can't recall much about access but i suppose you should

    see if the tables holding this data are defined the same (ie check for unicode

    or whatever switches).

    btw nobody really uses access for web apps or in fact any app that requires

    multiple users.

    Inspiring
    May 3, 2009

    Hi, Malte,

    A few questions for you:

    1. How is the umlaut added in your customer object created? Is it with the HTML entity (&uuml;) or the Unicode code (U+00FC) or is the umlaut typed directly into the form?

    2. You mention that you "placed <cfset SetEncoding("form", "UTF-8") /> in Application.cfm of the first Script". Is there a reason this isn't in both scripts?

    3. This is probably not related but just to be thorough, is there any different in the OS in terms of the language it's set to use by default (Deutsch, English, etc.)?

    I'm going to try and replicate the issue on my Win 2K3 box that runs CF 8.0.1. Can you tell me anything about the Access DB that might be relevant (i.e., the name and type of the field into which the umlaut will be submitted)?

    Cheers,

    Craig