[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Japanese text gets garbled with enctype="multipart/form-data"

Posted on 2004-11-10
20
Medium Priority
?
436 Views
Last Modified: 2008-02-01
I am having a page with
<form id="frmTest" method="Post" ENCTYPE="multipart/form-data">

so it uses Set Upload = Server.CreateObject("Persits.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_comments")

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_comments") along with ENCTYPE="multipart/form-data"..   so how do I save the Japanese comments ??
I am sure this is being done on various Japanese sites..... PLEASE HELP !!!!!
0
Comment
Question by:DeepBlueInVB
  • 10
  • 7
  • 3
20 Comments
 
LVL 6

Expert Comment

by:masirof
ID: 12543996
Try to use
@Codepage = 932 (I think it is 932 for japanese)
Session.LCID = 1041

I am not really sure about numbers, you may have to check.
0
 
LVL 9

Expert Comment

by:riyasjef
ID: 12545817
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_commentsField) 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
0
 
LVL 9

Expert Comment

by:riyasjef
ID: 12545825
put this in the comment viewing page

<%@ language=vbscript codepage=65001 %>
<meta http-equiv="content-type" content="text/html;charset=utf-8">

RJ
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 9

Expert Comment

by:riyasjef
ID: 12546797
nchar and nText are also national language suppot data types
0
 
LVL 1

Author Comment

by:DeepBlueInVB
ID: 12551793
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!!!!
0
 
LVL 6

Expert Comment

by:masirof
ID: 12553009
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..
0
 
LVL 1

Author Comment

by:DeepBlueInVB
ID: 12564427
set language japanese,  is not required, like I said, I have other pages (without Upload facility) saving Japanese text just fine !!!!
0
 
LVL 1

Author Comment

by:DeepBlueInVB
ID: 12564465
200 Bonus points, if I get the solution before Monday !!!!
0
 
LVL 6

Expert Comment

by:masirof
ID: 12564566
Eheheeh :))) Too few, more :))
0
 
LVL 6

Expert Comment

by:masirof
ID: 12564611
Try to put this : <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=SHIFT-JIS">  on both saving and sending pages..
0
 
LVL 6

Expert Comment

by:masirof
ID: 12564629
And try unicode too
0
 
LVL 1

Author Comment

by:DeepBlueInVB
ID: 12564819
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)
0
 
LVL 6

Expert Comment

by:masirof
ID: 12564829
:))
Ok, please try to print on the saving page. Do you get data OK?
0
 
LVL 6

Expert Comment

by:masirof
ID: 12564995
ok, hold I am trying to figure out..
0
 
LVL 6

Accepted Solution

by:
masirof earned 2000 total points
ID: 12565350
You say that other pages without enctype everything cool.

Maybe  : http://www.aspupload.com/manual_unicode.html

On top : <%@ LCID = 1041 CodePage = 932 %>
Please try..
0
 
LVL 1

Author Comment

by:DeepBlueInVB
ID: 12576975
oks shall try this out on Monday....
0
 
LVL 6

Expert Comment

by:masirof
ID: 12579448
waiting.. :)
0
 
LVL 1

Author Comment

by:DeepBlueInVB
ID: 12583303
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!!!

http://www.experts-exchange.com/Web/Q_21206938.html
0
 
LVL 1

Author Comment

by:DeepBlueInVB
ID: 12592481
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
=======================
0
 
LVL 6

Expert Comment

by:masirof
ID: 12601579
No problem :)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
The viewer will learn how to dynamically set the form action using jQuery.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses
Course of the Month18 days, 15 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question