By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,574 Members | 3,021 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,574 IT Pros & Developers. It's quick & easy.

Http requests and character transfer

P: n/a
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
Share this Question
Share on Google+
8 Replies


P: n/a
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

P: n/a
"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

P: n/a
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

P: n/a

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

P: n/a
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

P: n/a
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

P: n/a

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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.