Ask a Question related to Coldfusion - Getting Started, Design and Development.

  1. #1

    Default Japanese characters

    I am puting into a SQL server DB that is set to VarChar and i am using CF 6.1.

    I want to do this in Japanese however all I am getting is "????" instead of
    japanese characters.

    What do I have to do to have everything come out in Japanese?

    Thank you in advance.
    Attach Code

    <cfprocessingdirective pageEncoding="UTF-8">
    <cfcontent type="text/html; charset=UTF-8">
    <cfparam name="pass" default="0">
    <cfif pass eq '1'>
    <cfquery name="cat" Datasource = "test">
    Insert INTO test
    (test)
    Values ('#test#')
    </cfquery>
    </cfif>
    <cfquery name="cat" Datasource = "test">
    SELECT *
    FROM Test
    </cfquery>
    <html>

    <body>
    <cfoutput query="cat">
    #test#,
    </cfoutput>
    <cfform action="jcat.cfm" method="post" enctype="multipart/form-data"
    enablecab="yes">
    <input name="pass" type="hidden" value="1">
    <input name="test" type="text">
    <input name="" type="submit">
    </cfform>

    </body>
    </html>


    koeniga Guest

  2. Similar Questions and Discussions

    1. Problem displaying Japanese characters
      Hi, I want my application to have "Lucida Grande" font. Since I am not sure that every platform has it locally installed, I embedded it. I...
    2. Japanese characters.
      Hi, In Acrobat SDK 6.0 we are using wordproc to fetch the word from pdf document. We are creating links for that word also. I want to extract word...
    3. Japanese Characters?
      How do I incorporate Japanese characters into a German version of Flash MX? Is Japanese text right-to-left? Top-to-bottom? Any clues would be...
    4. how to read japanese characters (multilingual characters) from a text file and save them in Access database ???
      HI All i m trying to read a text file, having some japanese characters and saved as UTF-8 encoding. I m using ASP,FSO ... my code is below,...
    5. Can not display Japanese Characters correctly
      Hi there.... I try do display japanese characters with ASP .NET. (visual basic) but the output is unreadable. (‚±‚ñ‚É‚¿‚Ã) When...
  3. #2

    Default Japanese characters

    I am puting into a SQL server DB that is set to VarChar and i am using CF 6.1.

    I want to do this in Japanese however all I am getting is "????" instead of
    japanese characters.

    What do I have to do to have everything come out in Japanese?

    Thank you in advance.
    Attach Code

    <cfprocessingdirective pageEncoding="UTF-8">
    <cfcontent type="text/html; charset=UTF-8">
    <cfparam name="pass" default="0">
    <cfif pass eq '1'>
    <cfquery name="cat" Datasource = "test">
    Insert INTO test
    (test)
    Values ('#test#')
    </cfquery>
    </cfif>
    <cfquery name="cat" Datasource = "test">
    SELECT *
    FROM Test
    </cfquery>
    <html>

    <body>
    <cfoutput query="cat">
    #test#,
    </cfoutput>
    <cfform action="jcat.cfm" method="post" enctype="multipart/form-data"
    enablecab="yes">
    <input name="pass" type="hidden" value="1">
    <input name="test" type="text">
    <input name="" type="submit">
    </cfform>

    </body>
    </html>


    forumnotifier Guest

  4. #3

    Default Re: Japanese characters

    first off use the JDBC driver (labeled as ms sql server) not the ODBC one. next
    your tables need to use the "N" datatypes ot hold unicode data, so that would
    be nvarchar, nchar and ntext. now on to your code: you'll need to use the
    unicode hinting when inserting text:

    INSERT test (test)
    VALUES (N'#test#')

    but it's a better idea to use cfqueryparam. read more about cfqueryparam and
    sql server [url]http://www.sustainablegis.com/unicode/greekTest.cfm[/url].


    PaulH Guest

  5. #4

    Default Japanese Characters

    I am puting information into a SQL 2000 database. I am using nvarchar.

    I am also <cfprocessingdirective pageEncoding="UTF-8"> at the top of every
    page and this is on my application page.
    <cfset setEncoding("URL", "UTF-8")>
    <cfset setEncoding("FORM", "UTF-8")>
    <cfcontent type="text/html; charset=UTF-8">

    I am able to pull the information out of the database correctly. However when
    I go to do a loop it comes out as "???C"

    The code for the looped output is:

    <cfoutput>
    <cfloop index="IndexCount" from="1" To="#ListLen(Session.CrtProductID, "^")#">
    <tr>
    <td width="50%" style="border: 1 solid ##000000" valign="middle">
    #ListGetAt(Session.CrtProductName,IndexCount, "^")#</td>
    <form method="POST" action="docart.cfm">
    <td width="25%" style="border: 1 solid ##000000" valign="middle">
    <p align="center">

    <input type="text" name="UpdateQuantity" size="5"
    value="#ListGetAt(Session.CrtQuantity, IndexCount, " ^")#">
    <input type="submit" value="Update" name="ChangeQuantity">
    <a href="docart.cfm?Action=Delete&CartIndex=#IndexCou nt#">
    <font size = "1">Remove</font></a>
    <input type="Hidden" Name = "CartIndex" Value = "#IndexCount#"></p>
    </td></form>

    <td width="25%" style="border: 1 solid ##000000" valign="middle">
    <cfset TotalOfItems = #ListGetAt(Session.CrtPrice, IndexCount, "^")# *
    #ListGetAt(Session.CrtQuantity, IndexCount, "^")#>#dollarformat(TotalOfItems)#
    </td>
    <cfset CrtTotal = #CrtTotal# + #TotalOfItems#>
    </tr>


    </cfloop>
    </cfoutput>

    Thank you for your help in advance.





    koeniga Guest

  6. #5

    Default Re: Japanese Characters

    where exactly is that output occuring? nothing you're doing w/listGetAt, etc should mangle your chars.
    PaulH Guest

  7. #6

    Default Re: Japanese Characters

    Thank you for your help!

    #ListGetAt(Session.CrtProductName,IndexCount, "^")#

    Is where the output is coming from.

    [url]http://alohaspunlights.com/jp/candle.cfm?cat_id=20[/url]
    and click on the add to cart button you will see the results.

    Once again thank you.


    koeniga Guest

  8. #7

    Default Re: Japanese Characters

    ok, well that's another page. that page looks like shift_JIS plus utf-8. it
    seems you're mixing encoding. when i set my broswer to shift_JIS on the
    docart.cfm page i get:

    ?????C

    not sure if that's right but at least it's readable to me. if i navigate to
    other pages (cat.cfm for example) it's also shift_JIS.

    so you have an encoding problem. pick *one* encoding (i always recommend
    unicode) and stick w/it.


    PaulH Guest

  9. #8

    Default Re: Japanese Characters

    Thank you I will work on that and let you know what happens.

    Thank you!
    koeniga 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