ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 23rd, 2003, 01:13 AM
pmt1 pmt1 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 3 pmt1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Handling Japanese Character sets

Encountering difficulties in handling Japanese character sets - running MySQL with default language set at sjis on an apache server. Running CF MX 6.1 English.

I am posting a form containing both English and Japanese text. Form type is enctype="multipart/form-data"

I tried setting page encoding to shift-jis, using cfcontent tag and CFprogressivedirective tag but still the result is roman characters (squares and triangles) where there should be Japanese text in the database.

Through phpmyadmin I entered Japanese text directly and the output CF application displayed the Japanese text okay.

This is probably something real simple - is there a setting (global variable) on CF admin I need to set or some script I need to run.

Any ideas/input greatly appreciated

Thank you

Reply With Quote
  #2  
Old September 23rd, 2003, 10:53 AM
Demarco Demarco is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 18 Demarco User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
You mention mysql
which doesnt support utf afaik
can you post you form update code plz

Last edited by Demarco : September 23rd, 2003 at 10:57 AM.

Reply With Quote
  #3  
Old September 24th, 2003, 09:10 AM
pmt1 pmt1 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 3 pmt1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for the response

Code is as follows (its an update/insert routine) really straightforward stuff - I have tried many things to get this to run. Do you know if there is a setting in the MySQL database connection I need to add defining character set encoding?

Cheers



<html lang="ja">
<head>
<title>Sales and Marketing Lead Action</title>
<meta http-equiv="content-style-type" content="text/css; charset=x-sjis">


<cfprocessingdirective pageencoding="Shift-jis">



<cfif IsDefined("Form.Record_ID")>


<cfquery name="GetRecord" datasource="#recruit.DS#">
Update mktgcnt SET
firstname_eng = '#Form.firstname_eng#',
firstname_jp = '#Form.firstname_jp#',
lastname_eng = '#Form.lastname_eng#',
lastname_jp = '#Form.lastname_jp#',
position_eng = '#Form.position_eng#',
position_jp = '#Form.position_jp#',
organisation_jp = '#Form.organisation_jp#',
organisation_eng = '#Form.organisation_eng#',
street_eng = '#Form.street_eng#',
town_eng = '#Form.town_eng#',
city_eng = '#Form.city_eng#',
state_eng = '#Form.state_eng#',
zip_eng = '#Form.zip_eng#',
country_eng = '#Form.country_eng#',
street_jp = '#Form.street_jp#',
town_jp = '#Form.town_jp#',
city_jp = '#Form.city_jp#',
state_jp = '#Form.state_jp#',
zip_jp = '#Form.zip_jp#',
country_jp = '#Form.country_jp#',
status = '#Form.status#',
sector = '#Form.sector#',
tel = '#Form.tel#',
fax = '#Form.fax#',
email = '#Form.email#'
Where Record_Number = #Form.Record_ID#
</cfquery>

<cfif Find("Finished",Form.Edit_OK)>
<cflocation url="mktg_contact_list.cfm">
<cfelse>
<cflocation url="mktg_connotes_edit.cfm?clientID=#Form.clientID#" addtoken="No">
</cfif>


<cfelse>

<cfquery name="PutRecord" datasource="#recruit.DS#">
Insert into mktgcnt


(firstname_eng,firstname_jp,lastname_eng,lastname_jp,position_eng,position_jp,organisation_eng,organ isation_jp,street_eng,tow

n_Eng,city_Eng,state_Eng,zip_Eng,country_Eng,street_jp,town_jp,city_jp,state_jp,zip_jp,country_jp,st atus,sector,tel,fax,email

)
Values

('#Form.firstname_eng#','#Form.firstname_jp#','#Form.lastname_eng#','#Form.lastname_jp#','#Form.posi tion_eng#','#Form.positio

n_jp#','#Form.organisation_eng#','#Form.organisation_jp#','#Form.street_eng#','#Form.town_Eng#','#Fo rm.city_Eng#','#Form.stat

e_Eng#','#Form.zip_Eng#','#Form.country_Eng#','#Form.street_jp#','#Form.town_jp#','#Form.city_jp#',' #Form.state_jp#','#Form.z

ip_jp#','#Form.country_jp#','#Form.status#','#Form.sector#','#Form.tel#','#Form.fax#','#Form.email#' )
</cfquery>


<cfif Find("Finished",Form.Edit_OK)>
<cflocation url="mktg_contact_list.cfm">
<cfelse>

<cfquery name="GetID" datasource="#marketing.DS#">
Select Max(Record_Number) as ID from mktgcnt
</cfquery>


<cflocation url="mktg_connotes_edit.cfm?ClientID=#getid.id#" addtoken="No">
</cfif>




</cfif>

</html>

Reply With Quote
  #4  
Old September 29th, 2003, 03:23 AM
Demarco Demarco is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 18 Demarco User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
try some other char sets
other than x-sjis

ms_Kanji , shift_jis ,csShiftJIS

Reply With Quote
  #5  
Old September 29th, 2003, 09:14 AM
pmt1 pmt1 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 3 pmt1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
cheers

got it fixed over the weekend - the solution was to add a connection string to the MySQL database connection in CF administrator, advanced database settings tab telling it to accept shift-JIS as a character set and then remove all charset information from pages (including meta tags)

wasnt the most obvious thing to me but I am not an expert CF user - but I sure wont forget it now ...

thanks

Reply With Quote
  #6  
Old September 29th, 2003, 09:19 AM
Demarco Demarco is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 18 Demarco User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ah -
didnt know that myself as I dont use mysql as i dont find it robust 0r even capable for enough for my needs -

But worthly of note to add to my cf book of tips

Reply With Quote
  #7  
Old June 18th, 2004, 12:42 PM
SidShah SidShah is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 2 SidShah User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
japanese char's

Hi,

I saw that you was working around japanese chars.
i am trying to type jap chars in form and trying to insert them in to database. but not able to insert them. they get converted in to some ?..?/.. chars when they go in to database.
Do you know how do i do it.

Please respond,

Thanks,

Sid


Quote:
Originally Posted by pmt1
cheers

got it fixed over the weekend - the solution was to add a connection string to the MySQL database connection in CF administrator, advanced database settings tab telling it to accept shift-JIS as a character set and then remove all charset information from pages (including meta tags)

wasnt the most obvious thing to me but I am not an expert CF user - but I sure wont forget it now ...

thanks

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Handling Japanese Character sets


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT