4 Replies Latest reply: Dec 20, 2006 8:34 PM by Newsgroup_User RSS

    Spanish Characters in CFMX

    RGracia Community Member
      Hello all, my web host has moved us to a Windows 2003 server running CFMX from a Windows 2000 with CF5. In both cases the database used for content was MySQL 4.1.5.

      Now here's the thing, in the old 2000/CF5 server combination, all Spanish Characters like í, é, ó, á etc would display correctly across the site. We have a bilingual site. As soon as we were moved to the new 2003/CFMX combination server, we are getting garbage instead of the correct characters everywhere and it's driving me off the walls trying to figure out what can be done as the web host clearly doesn't.

      Suggestions?
        • 1. Re: Spanish Characters in CFMX
          Newsgroup_User Community Member
          RGracia wrote:
          > Hello all, my web host has moved us to a Windows 2003 server running CFMX from
          > a Windows 2000 with CF5. In both cases the database used for content was MySQL
          > 4.1.5.

          unicode? got a connection string? usually useUnicode=true&characterEncoding=utf8

          > Now here's the thing, in the old 2000/CF5 server combination, all Spanish
          > Characters like �, �, �, � etc would display correctly across the site. We have
          > a bilingual site. As soon as we were moved to the new 2003/CFMX combination
          > server, we are getting garbage instead of the correct characters everywhere and
          > it's driving me off the walls trying to figure out what can be done as the web
          > host clearly doesn't.

          what db driver? it should be JDBC.
          • 2. Re: Spanish Characters in CFMX
            RGracia Community Member
            No they have created a CF dsn for us at their level and we use no connection string. All the templates that pull Spanish content include at the top is the one included here. It's just a basic connection instruction and the SQL command to get the Spanish only records for that section. You see the problem is that they don't give me access to the CF Administrator settings so when stuff like this begins to happen, I am stuck waiting for them. How is the Spanish characters handling different from CF5 in MX?
            • 3. Spanish Characters in CFMX
              RGracia Community Member
              They have just replied telling me the only way to solve the problem, which seems to be working is to add the following code to the beginning of any template displaying Spanish characters. I will go for that for now and keep checking if a simpler solution is on the way or already exists. Thanks folks:

              Here's their letter:

              This is an issue that is inherent with Colfussion MX 7, and one issue that Coldfussion has not created an easy fix for. So far the only way we have been able to do it is, instead of using the "SetLocale" function we used a direct character "cfset SetEncoding" command to format the text with a Latin ISO number.

              Basically, on any pages where you need Spanish characters displayed you must put this code in the beginning of the page:

              <see code below>

              This tells the page to execute the code in Spanish format.
              • 4. Re: Spanish Characters in CFMX
                Newsgroup_User Community Member
                RGracia wrote:
                > <cfset SetEncoding("url","ISO-8859-1")>
                > <cfset SetEncoding("form","ISO-8859-1")>
                > <cfcontent type="text/html; charset=ISO-8859-1">

                well that's one difference cf5 to cfmx, mx actually cares about encoding. it
                defaults to utf-8 (unicode). that stuff can actually go in your application.cfm
                & won't (or shouldn't) effect your other non-spanish pages (as long as they are
                also iso-8859-1).