DeepBlueInVB
asked on
Japanese text gets garbled with enctype="multipart/form-data"
I am having a page with
<form id="frmTest" method="Post" ENCTYPE="multipart/form-da ta">
so it uses Set Upload = Server.CreateObject("Persi ts.Upload. 1") to access the form elements. and for file uploading.
There is also a field "additional_comments" which is being accessed as :
additional_comments = Upload.Form("additional_co mments")
Now the data is saved correctly if entered in English, but if I enter Japanese text it gets garbled by the Upload object and hence is not saved correctly.
I understand that u cannot use Request.Form("additional_c omments") along with ENCTYPE="multipart/form-da ta".. so how do I save the Japanese comments ??
I am sure this is being done on various Japanese sites..... PLEASE HELP !!!!!
<form id="frmTest" method="Post" ENCTYPE="multipart/form-da
so it uses Set Upload = Server.CreateObject("Persi
There is also a field "additional_comments" which is being accessed as :
additional_comments = Upload.Form("additional_co
Now the data is saved correctly if entered in English, but if I enter Japanese text it gets garbled by the Upload object and hence is not saved correctly.
I understand that u cannot use Request.Form("additional_c
I am sure this is being done on various Japanese sites..... PLEASE HELP !!!!!
Hi
when u save details database field corr:to additional_comments must be of type "nvarchar" to support multilanguges..
Also in the query should be
INSERT INTO tableName(id,additional_co mmentsFiel d) VLAUES (1,N'"& additional_comments & "')
Note 'N' - prefix for nvarchar field
put
<%@ language=vbscript codepage=65001 %>
<meta http-equiv="content-type" content="text/html;charset =utf-8">
in the top
RJ
when u save details database field corr:to additional_comments must be of type "nvarchar" to support multilanguges..
Also in the query should be
INSERT INTO tableName(id,additional_co
Note 'N' - prefix for nvarchar field
put
<%@ language=vbscript codepage=65001 %>
<meta http-equiv="content-type" content="text/html;charset
in the top
RJ
put this in the comment viewing page
<%@ language=vbscript codepage=65001 %>
<meta http-equiv="content-type" content="text/html;charset =utf-8">
RJ
<%@ language=vbscript codepage=65001 %>
<meta http-equiv="content-type" content="text/html;charset
RJ
nchar and nText are also national language suppot data types
ASKER
I have already put the foll at the top
<%@ language=vbscript codepage=65001 %>
<meta http-equiv="content-type" content="text/html;charset =utf-8">
also the database field is indeed nvarchar, but the problem is that the Japanese gets garbled on the form itself (before db update)
I have other pages with similar data, without the file upload part, where the Japanese data gets saved fine, with the codepag and content-type directives put in..
Any ideas guys!!!!
<%@ language=vbscript codepage=65001 %>
<meta http-equiv="content-type" content="text/html;charset
also the database field is indeed nvarchar, but the problem is that the Japanese gets garbled on the form itself (before db update)
I have other pages with similar data, without the file upload part, where the Japanese data gets saved fine, with the codepag and content-type directives put in..
Any ideas guys!!!!
You may try to tell database that a japanese encode type query is to come..
execute this command "set language japanese" just before u insert ur data..
execute this command "set language japanese" just before u insert ur data..
ASKER
set language japanese, is not required, like I said, I have other pages (without Upload facility) saving Japanese text just fine !!!!
ASKER
200 Bonus points, if I get the solution before Monday !!!!
Eheheeh :))) Too few, more :))
Try to put this : <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=SHIFT-JIS"> on both saving and sending pages..
And try unicode too
ASKER
Try to put this : <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=SHIFT-JIS"> on both saving and sending pages..
This has already been done, doesnt work....
what about Unicode ????
and no more points !!!! 500 + 200 bonus (if bfor monday)
This has already been done, doesnt work....
what about Unicode ????
and no more points !!!! 500 + 200 bonus (if bfor monday)
:))
Ok, please try to print on the saving page. Do you get data OK?
Ok, please try to print on the saving page. Do you get data OK?
ok, hold I am trying to figure out..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
oks shall try this out on Monday....
waiting.. :)
ASKER
Oks got it by Monday, mucho thanx Masirof
The solution is to put Upload.codepage = 65001, after the CreateObject statement.....
Just post a comment on the foll question for the 200 points!!!
https://www.experts-exchange.com/questions/21206938/Points-for-Masirof.html
The solution is to put Upload.codepage = 65001, after the CreateObject statement.....
Just post a comment on the foll question for the 200 points!!!
https://www.experts-exchange.com/questions/21206938/Points-for-Masirof.html
ASKER
Sorry Masirof, looks like its against the policy !!!!!
=======================
I have deleted this question as it violates the Member Agreement regarding abusing the points system.
A question can have a maximum of 500 points assigned which you allready awarded at http:Q_21201377.html
CetusMOD
Community Support Moderator
=======================
=======================
I have deleted this question as it violates the Member Agreement regarding abusing the points system.
A question can have a maximum of 500 points assigned which you allready awarded at http:Q_21201377.html
CetusMOD
Community Support Moderator
=======================
No problem :)
@Codepage = 932 (I think it is 932 for japanese)
Session.LCID = 1041
I am not really sure about numbers, you may have to check.