473,787 Members | 2,932 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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;s id;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 1790
Hi Kipaku,

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

Take a look at Server.UrlEncod e/UrlDecode (characters in the url) or
Server.HtmlEnco de/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 "HttpUtilit y" 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******** ******@TK2MSFTN GXA01.phx.gbl:
Then, you may take a look at the classs "HttpUtilit y" 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******** ******@TK2MSFTN GXA01.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
3045
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 OK
16
2700
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
1010
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, Do I make myself clear? For example I got my mail page on
0
3886
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 tools like ieHTTPHeaders v1.6, and I perform a normal login (using the normal website), I see that the viewstate is __VIEWSTATE=dDwxMzU4OTE3NTA2Ozs%2BTK88jS63JXN181X3N8zKivua8co%3D&txt_username=xxx&txt_password=xxxxxx&btn_login=Login. When I...
2
7402
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: http://groups.google.com/group/comp.lang.php/browse_thread/thread/401e2b5cb251c21/8a0eeb03626018f4?lnk=st&q=lazypig06%40gmail.com&rnum=1&hl=en#8a0eeb03626018f4 Thanks to Álvaro G. Vicario for pointing out "chunked" transfer thing. Anyway, I tried to avoid "chunked" transfer in HTTP protocol. I have looked at...
4
12152
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 without the user having to wait. I'm doing this (with fsockopen) by sending an http request to a page that does the time consuming stuff and then immediatly closing, without having read any of the response. This way, I don't have to wait for the...
3
2155
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 implemented it via fsockopen, like this: <? $url = $_REQUEST; // take the param as $uri //... more ...
3
3161
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 if user hits Cancel button'; exit; } else {
2
4129
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 location of the path to the file to fetch during the XmlHttpRequest request it has to the be the path relative to the web page such as /secret.php and NOT a full URL such as https://www.example.com/secret.php .. is this about the general idea??...
0
9655
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9497
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10363
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10110
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9964
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7517
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4067
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.