Character encoding

S

SalamElias

Hi,
I have a partner sending me by post method to an asp page some text (xml
string).
It arrives to my page encoded as follows
%9a%2f%Purchaseorder%3....f
The < and > and spaces are replaced by nuùmbers and percentage sign
I am using Request.BinaryRead(BytesTotal) and then doing response write and
I am getting exactly the same string with the encoding
How can tell my asp page to translate the encoded text to normal text?
Than ks in advancs
Salam
 
M

Martin Honnen

SalamElias wrote:

I have a partner sending me by post method to an asp page some text (xml
string).
It arrives to my page encoded as follows
%9a%2f%Purchaseorder%3....f
The < and > and spaces are replaced by nuùmbers and percentage sign
I am using Request.BinaryRead(BytesTotal) and then doing response write and
I am getting exactly the same string with the encoding
How can tell my asp page to translate the encoded text to normal text?

It depends on the content type of the POSTed data, if it is text/xml or
application/xml then you should simply be able to use MSXML e.g.
Dim PostedXml, Loaded
Set PostedXml = Server.CreateObject("Msxml2.DOMDocument.3.0")
PostedXml.async = False
Loaded = PostedXml.load(Request)
If Loaded Then
'use DOM to read out the content of nodes
Else
'handler PostedXml.ParseError
End If

If the posted data is posted as application/x-www-form-urlencoded (which
what you have above looks like) then it should consist of
paramname=paramvalue pairs and within ASP you can access
Request.Form("paramname")
and get the decoded value.

If the data is posted with some made up format then you need to write
your own decoder obviously.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top