|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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. |
|
#3
|
|||
|
|||
|
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> |
|
#4
|
|||
|
|||
|
try some other char sets
other than x-sjis ms_Kanji , shift_jis ,csShiftJIS |
|
#5
|
|||
|
|||
|
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 |
|
#6
|
|||
|
|||
|
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 ![]() |
|
#7
|
|||
|
|||
|
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:
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Handling Japanese Character sets |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|