Paul,

What appears to be going on here is 7-bit ascii that is a representation of
Japanese (non-unicode).
You can do a couple things to solve this issue.

1. Conver the data to unicode. Move the data into a ntext or nvarchar field
in the database that properly stores the DBCS (double byte character set). 
2. Live with the data type and display the data via an encode / decode
process that will display the data properly. I have an article on my blog
here that explains the use of the java.nio.charset.Charset class:
http://www.phillipholmes.com/?p=46

This kind of character sleuthing is not that big of a deal but you obviously
would only use this as a stop gap until the data type can be corrected.


Contact me offline if you have further questions.

Warmest Regards,
 
Phillip B. Holmes
http://phillipholmes.com










-----Original Message-----
From: Paul Hastings [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 01, 2006 8:50 PM
To: CF-Talk
Subject: Re: Displaying Japanese characters

Marcus Whitworth wrote:
> Hi,
> 
> I am having trouble displaying Japanese characters in a client site I 
> have inherited. Apparently it used be hosted on CF 5, but we are now
running MX7.
> 
> The page is:
> http://pointout.whiteyork.com/japanese/index.cfm?page=category&id=7
> 
> I have placed
> 
> <cfprocessingdirective pageencoding="SHIFT_JIS">

for starters i see:
<meta http-equiv="content-type" content="text/html; charset=UTF-8">

are you using cfcontent? have you used setEncoding? both of these tags can
go in the application.cfm or application.cfc, cfprocessingdirective must go
on each page.

<cfset setEncoding("form","Shift-JIS")>
<cfset setEncoding("url","Shift-JIS")>
<cfcontent type="text/html; charset=Shift-JIS">


finally what's the encoding of the physical files? if these things have a
BOM ie could be utf-8 then that's what cf will encode the text stream as.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239220
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to