473,394 Members | 1,902 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

problem with the encodüng of the posted data

Hi,

I am posting some data in Turkish with the HttpWebRequest and saving the
response stream in the database. The characters in the page are shown
properly but the Turkish characters in the posted data are not shown
properly. I couldn't find any solution. Please help me...
Code is given below:

Sub UploadDoc()
Dim myWebReq As HttpWebRequest
Dim myWebResp As HttpWebResponse
Dim authCookie As HttpCookie
Dim cc As New CookieContainer()
Dim encoding As New System.Text.UnicodeEncoding()
Dim postData As String
Dim data() As Byte
Dim s As Stream
Dim sr As StreamReader
myWebReq =
WebRequest.Create("http://burak/database/medicalDocs/F324.aspx")
authCookie = Request.Cookies(FormsAuthentication.FormsCookieNam e)
myWebReq.CookieContainer = cc
myWebReq.CookieContainer.Add(New System.Net.Cookie(authCookie.Name,
authCookie.Value, authCookie.Path, "burak"))
postData += "fd=" + txtFlightDate.Text
postData += "&"
postData += "fn=" + txtFlightNo.Text
postData += "&"
postData += "notes=" + txtNotes.Text
data = encoding.GetBytes(postData)
myWebReq.Method = "POST"
myWebReq.ContentType = "application/x-www-form-urlencoded"
myWebReq.ContentLength = data.Length
s = myWebReq.GetRequestStream()
s.Write(data, 0, data.Length)
myWebResp = myWebReq.GetResponse
s.Close()
sr = New StreamReader(myWebResp.GetResponseStream, encoding.Unicode)
Dim strHTML As String
strHTML = sr.ReadToEnd()
Dim docBuffer() As Byte
docBuffer = encoding.GetBytes(strHTML)
'Upload into the database..

strSql = "spUploadDocIntoDatabase"

Nov 20 '05 #1
0 829

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Aaron Prohaska | last post by:
I have just run into a problem where I have a page that posts back to itself to execute code, except when the page does the post back it somehow executes code that is in our home page for the site....
2
by: Sojwal | last post by:
We are working on a asp.net application in which we need to send some data to a PHP application on another server. We are using HttpWebRequest object to 'POST' the data to a PHP page as key-value...
11
by: Abhishek | last post by:
I have a problem transfering files using sockets from pocket pc(.net compact c#) to desktop(not using .net just mfc and sockets 2 API). The socket communication is not a issue and I am able to...
1
by: buran | last post by:
Hi, I am posting some data in Turkish with the HttpWebRequest and saving the response stream in the database. The characters in the page are shown properly but the Turkish characters in the...
0
by: Lotta P | last post by:
Hi, I have a problem concerning encoding when posting a form. The form (a textbox and a button) is posted using JavaScript and a window.location("http://therecieverofthedata"). The website...
0
by: egbert.beuker | last post by:
Hi, I encountered a conversion problem in my .net web app (c#), and I hope someone can help me: I'm working on a generic way to store data in a database with a few generated classes. I want...
0
by: JACompute | last post by:
I have an invoicing system that uses a VB6 program to post new invoice entries to a centralized Vendor management system (also in VB6), via a Web server and some ASP code. The system has been in...
9
by: HC | last post by:
Hello, all, I started out thinking my problems were elsewhere but as I have worked through this I have isolated my problem, currently, as a difference between MSDE and SQL Express 2005 (I'll just...
4
by: daroman | last post by:
Hi Guys, i've problem with my small C++ programm. I've just small template class which represetns a array, everything works fine up to combination with std::string. I did tried it with M$ VC++ and...
1
by: Dhananjay | last post by:
hi all, I am facing problem in programming.Can anybody please let me know how to solve the problem. I have a link, clicking the link opens a page in which there are some data which is coming from...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.