Ask a Question related to Coldfusion - Getting Started, Design and Development.
-
koeniga #1
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
-
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... -
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... -
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... -
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,... -
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... -
forumnotifier #2
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
-
PaulH #3
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
-
koeniga #4
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
-
PaulH #5
Re: Japanese Characters
where exactly is that output occuring? nothing you're doing w/listGetAt, etc should mangle your chars.
PaulH Guest
-
koeniga #6
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
-
PaulH #7
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
-
koeniga #8
Re: Japanese Characters
Thank you I will work on that and let you know what happens.
Thank you!
koeniga Guest



Reply With Quote

