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:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #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!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

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





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway