473,405 Members | 2,415 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,405 software developers and data experts.

Http requests and character transfer

Hi to all,

we are building a fairly complex system here in work, and we couldn't
imagine
from the start that we would spend too much time just to transfer safely
some kind of characters from one network point to another...
I explain:

One part of our system is a custom, multithreaded http server that sits
and waits
for requests to be dispatched.
One of the arguments of these requests may have Greek characters within
it.
(requests is something like this: /ContactService;787;NetworkID;sid;and
here goes the Greeks)

We used C# 2 to create the http server, while the client that sends the
requests maybe a .net component of ours,
or calls from Sql Server 2000 through the WinHttp COM dll that Microsoft
provides
(using WinHttp 5.1 on Windows Server 2003) by a stored procedure that we
also have written
(sp_oacreate and the like)

we have found a mapping that works in one case and Greek characters are
transfered correctly
but not in another (e.x. mapping that works with our custom http server
but not when sending
in a browser where the Greeks are not displayed at all...)

In any case, is there a "correct" way, or a standard, to be used in
situations that envolve
http requests and characters transfering other that standard English ??
And i am not talk only about custom http servers but also web browsers,
web servers etc etc...


thanks a lot for any help on this,
Kikapu
Nov 14 '06 #1
8 1769
Hi Kipaku,

Take a look at Server.UrlEncode/UrlDecode (characters in the url) or
Server.HtmlEncode/HtmlDecode (characters in the document itself)
--
Happy Coding!
Morten Wennevik [C# MVP]
Nov 14 '06 #2
"Morten Wennevik" <Mo************@hotmail.comwrote in
news:op***************@tr024.bouvet.no:
Hi Kipaku,

Take a look at Server.UrlEncode/UrlDecode (characters in the url) or
Server.HtmlEncode/HtmlDecode (characters in the document itself)


Ok thanks, i will have a look for this.
But in the first scenario, i have to deal with WinHttp and COM,
and i cannot find a standard way to do these conversions...

Kikapu
Nov 14 '06 #3
Then, you may take a look at the classs "HttpUtility" and its methods, it
also can convert a string from web request.

Sincerely,

Luke Zhang

Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 15 '06 #4

Ok Luke, but isn't this a .net specific class ??
The problem currently i have is that i try to find a generic way to do
these conversions event in the scenario that a com (WinHttp) client
calls a .net Http Server...
Thanks again.

lu******@online.microsoft.com (Luke Zhang [MSFT]) wrote in
news:JR**************@TK2MSFTNGXA01.phx.gbl:
Then, you may take a look at the classs "HttpUtility" and its methods,
it also can convert a string from web request.

Sincerely,

Luke Zhang

Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti.../default.aspx#
notif ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent
issues where an initial response from the community or a Microsoft
Support Engineer within 1 business day is acceptable. Please note that
each follow up response may take approximately 2 business days as the
support professional working with you may need further investigation
to reach the most efficient resolution. The offering is not
appropriate for situations that require urgent, real-time or
phone-based interactions or complex project analysis and dump analysis
issues. Issues of this nature are best handled working with a
dedicated Microsoft Support Engineer by contacting Microsoft Customer
Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no
rights.

Nov 15 '06 #5
kikapu wrote:
Ok Luke, but isn't this a .net specific class ??
The problem currently i have is that i try to find a generic way to do
these conversions event in the scenario that a com (WinHttp) client
calls a .net Http Server...
URL encoding is a well documented standard.

You can do it in .NET, Java, VB6 whatever.

Even if you have to code it yourself the algorithm is
very simple.

Arne
Nov 16 '06 #6
I may be a little confused here. My suuggestion is to use HttpUtility" and
its methods in the .NET Server side code, to convert string passed from
client side. Is your server side should be a .NET application, or I
misunderstood something?

If there is any further question or concern, please feel free to let me
know.

Sincerely,

Luke Zhang

Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 16 '06 #7

Yes, the server side is .net app but it may well receive requests
from various clients, including COM as i previously said.

Do you mean that by using the HttpUtility class and methods on the
server, it doesn't then matter from which client (.net/com or other) the
server gets it's data ??

lu******@online.microsoft.com (Luke Zhang [MSFT]) wrote in
news:KU**************@TK2MSFTNGXA01.phx.gbl:
I may be a little confused here. My suuggestion is to use HttpUtility"
and its methods in the .NET Server side code, to convert string passed
from client side. Is your server side should be a .NET application, or
I misunderstood something?

If there is any further question or concern, please feel free to let
me know.

Sincerely,

Luke Zhang

Microsoft Online Community Support
==================================================
Nov 16 '06 #8
The answer is Yes if it was an HTTP Request. BTW, to trouble shoot such a
problem, you may also use some network trace tool like NETMON, or Fiddler,
to see what is actual data translated between server and client.

Sincerely,

Luke Zhang

Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 16 '06 #9

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

Similar topics

10
by: Lisa Pearlson | last post by:
Hi, I have a php script with no more than this: <?php echo "Hello World!"; ?> When a webbrowser client requests data, it receives Apache server headers, followed by my data: HTTP/1.1 200...
16
by: thenightfly | last post by:
Ok, I know all about how binary numbers translate into text characters. My question is what exactly IS a text character? Is it a bitmap?
1
by: Fernando Arámburu | last post by:
Hello everybody, I´m working on a web application and I need to make a difference between a page called from a PC and one made from Mobile because I need to do a transfer to diferent pages, ...
0
by: WIWA | last post by:
Hi, I want to login to a password protected website and fetch the content of the page behind. I have based my code on http://weblogs.asp.net/jdennany/archive/2005/04/23/403971.aspx. When I use...
2
by: lazypig06 | last post by:
Hi ! Yesterday, I posted a topic regarding to XML problem that I've been having. The old topic can be found at:...
4
by: yawnmoth | last post by:
Is it possible to send http requests with curl but not have curl wait for the response? The reason I ask is because I'd like to code a web app that can sorta start time consuming processes...
3
by: webEater | last post by:
Hey, I am writing a file that reads in an external file in the web and prints it out including the response header of the http protocol. I do this to enable cross domain XMLHttpRequests. I...
3
by: Reporter | last post by:
Here is an example from the PHP Manual <?php if ((!isset($_SERVER)) || (1==1)) { header('WWW-Authenticate: Basic realm="My Realm"'); header('HTTP/1.0 401 Unauthorized'); echo 'Text to send...
2
by: bizt | last post by:
Hi, I have a page that makes many XmlHttpRequest requests from a single page. This works fine but I need some requests to be made over a secure connection. To my understanding, when setting the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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.