13 Replies Latest reply on Jul 14, 2006 2:19 AM by Newsgroup_User

    linux+mysql+coldfusion can support chinese application?

    chinaeye Level 1
      any one have idea on this?
      linux (redhat enterprise)+mysql 5+coldfusion MX(utf-8) can support chinese application?
        • 1. Re: Help on Chinese insert into mysql (urgent)
          Level 7
          chinaeye wrote:
          > But when we moved to redhat linux +mysql, the chinese in the database
          > displayed as ?????. when we insert into database, the
          > chinese inserted like ????? as well...

          garbaged encoding. new db? if so what version of mysql? what driver are you
          using to talk to mysql? it can't be ODBC? if it's JDBC, do you have teh
          connection string setup correctly? it should be:

          "using useUnicode=true&characterEncoding=utf8"

          • 2. linux+mysql+coldfusion can support chinese application?
            chinaeye Level 1
            Dear all,
            Now I can insert Chinese into database through coldfusion page, but those chinese display in the Web page site like '????????????',
            Any one can help?

            Great Thanks, refer to:
            adsbus.com/test.cfm
            • 3. Re: linux+mysql+coldfusion can support chinese application?
              chinaeye Level 1
              thanks PaulH,

              using useUnicode=true&characterEncoding=utf8

              Yes, we apply it to our connection string,
              it is mysql 5, but now, the web page display those chinese as ????

              adsbus.com/test.cfm
              • 4. Re: linux+mysql+coldfusion can support chinese   application?
                Level 7
                post the code that inserts/displays the data.
                • 5. Re: linux+mysql+coldfusion can support chinese   application?
                  chinaeye Level 1
                  ---------------- this is insert page, no problem, can insert into database-----------------

                  <cfprocessingdirective pageEncoding="utf-8">
                  <cfset setEncoding("FORM", "utf-8")>
                  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

                  <html>
                  <head>
                  <title>Untitled</title>
                  </head>

                  <body>
                  <CFPARAM NAME="URLadd" DEFAULT="">
                  <cfset URLadd='www.'&#form.searchkey1#>
                  <cfquery name="createhtml" datasource="adsbus">
                  select *
                  from abus_html
                  where (URL_Link ='#form.searchkey1#') or (URL_Link='#URLadd#')
                  </cfquery>

                  <!--- <cfif #createhtml.recordcount# eq 0> --->
                  <cfquery name="insertName" datasource="adsbus">
                  insert into abus_html (Domain_Name,URL_Link,IP,Date_Add,Comments)
                  values (N'#trim(form.searchkey)#',
                  N'#trim(form.searchkey1)#',
                  '#cgi.remote_addr#',
                  #now()#,
                  N'#trim(form.comments)#'
                  )
                  </cfquery>
                  <cfinclude template="static_htmlbus.cfm">
                  <!--- </cfif> --->

                  <cfquery name="getsign" datasource="adsbus">
                  select *
                  from abus_b
                  where (URL_Link ='#form.searchkey1#') or (URL_Link='#URLadd#')
                  </cfquery>

                  <!--- <cfif #getsign.recordcount# eq 0> --->
                  <cfquery name="insertName" datasource="adsbus">
                  insert into abus_b
                  values (N'#trim(form.roadNo)#',
                  N'#trim(form.searchkey)#',
                  N'#trim(form.searchkey1)#',
                  '#cgi.remote_addr#',
                  #now()#
                  )
                  </cfquery>

                  <!--- </cfif> --->

                  </body>
                  </html>
                  • 6. Re: linux+mysql+coldfusion can support chinese application?
                    chinaeye Level 1
                    I checked the mysql 5, chinese is ok.

                    ------------------here is the display page chinese like ?????--------------------------


                    <cfprocessingdirective pageEncoding="utf-8">
                    <cfset setEncoding("FORM", "utf-8")>
                    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

                    <html>
                    <head>
                    <title>Untitled</title>
                    </head>
                    <body>
                    <cfquery name="createhtml" datasource="adsbus">
                    SELECT *
                    FROM `abus_html`
                    WHERE 1
                    LIMIT 0 , 30
                    </cfquery>
                    <cfoutput query="createhtml">#Domain_Name# ,#URL_Link#,#IP#,#Date_Add#,#Comments# <p></cfoutput>


                    <p><p>

                    <cfquery name="createhtml" datasource="adsbusco">
                    SELECT Domain_Name
                    FROM abus_html
                    </cfquery>
                    <cfoutput query="createhtml">#Domain_Name# <p></cfoutput>
                    </body>
                    </html>
                    • 7. Re: linux+mysql+coldfusion can support chinese application?
                      chinaeye Level 1
                      Thanks, PaulH, my application running fine in Window2003 English OS,
                      but when we moved to redhat...the problem comes out...
                      Please help, thanks.
                      • 8. Re: linux+mysql+coldfusion can support chinese     application?
                        Level 7
                        chinaeye wrote:
                        > values (N'#trim(form.searchkey)#',

                        that looks like ms sql server syntax. is that right for mysql?

                        > <cfinclude template="static_htmlbus.cfm">

                        do these includes also have cfprocessingdirectives?
                        • 9. Re: linux+mysql+coldfusion can support chinese     application?
                          Level 7
                          chinaeye wrote:
                          > values (N'#trim(form.searchkey)#',
                          > N'#trim(form.searchkey1)#',

                          btw you really should be using cfqueryparam for all these.
                          • 10. Re: linux+mysql+coldfusion can support chinese     application?
                            chinaeye Level 1
                            Hi,PaulH,
                            Yes, the mysql 5 can take most of the MS SQL 2000 query...
                            after my hosting side specify the connection string "using useUnicode=true&characterEncoding=utf8",
                            the insert of Chinese characters works fine.

                            The only issue is the retirving and display those chinese characters. now the web page display like ??????????

                            It is my first hung the question for few days....
                            • 11. Re: linux+mysql+coldfusion can support chinese       application?
                              Level 7
                              chinaeye wrote:
                              > Hi,PaulH,
                              > Yes, the mysql 5 can take most of the MS SQL 2000 query...
                              > after my hosting side specify the connection string "using
                              > useUnicode=true&characterEncoding=utf8",
                              > the insert of Chinese characters works fine.

                              how do you know it works "fine"? you can't rely on mysql admin tools for that.

                              > The only issue is the retirving and display those chinese characters. now the
                              > web page display like ??????????

                              garbaged encoding. still not sure the data is being inserted properly.
                              • 12. linux+mysql+coldfusion can support chinese application?
                                chinaeye Level 1
                                Hi,PaulH,
                                Thanks, I found the way, you are right, I remove the N' in the query...and insert again,
                                Although the chinese looks like garbaged encoded in the mysql database this time, but when I retrived it, IT IS COOL AND PRETTY!

                                Those Chinese directly insert from database level, although no problem, but coldfusion page cannot display it well, just ???.

                                Those Chinese I inserted from Coldfusion page with the N' in front, it is the same like the database level insertion, display like ???.

                                So I know the truth! and how to insert and retrive Chinese in New platform.-----insert into mySQL from the Coldfusion page without the N' in front of the query, and the retrive, display chinese characters should be OK!

                                Thanks, Cheers for Coldfusion,

                                Cheers for adsbus.com
                                • 13. Re: linux+mysql+coldfusion can support chinese         application?
                                  Level 7
                                  chinaeye wrote:
                                  > Those Chinese directly insert from database level, although no problem, but
                                  > coldfusion page cannot display it well, just ???.

                                  yes, you can't rely on the db tools to check this sort of thing.

                                  again i think you ought to make use of cfqueryparam.

                                  > Cheers for adsbus.com

                                  btw there are several free cf based blogs & bbs around.