Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Character encoding

Reply
Thread Tools

Character encoding

 
 
SalamElias
Guest
Posts: n/a
 
      01-21-2005
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
 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      01-21-2005


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.


--

Martin Honnen
http://JavaScript.FAQTs.com/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading Text File Encoding and converting to Perls internal UTF-8 encoding sln@netherlands.com Perl Misc 2 04-17-2009 11:22 PM
character encoding +missing character sequence raavi Java 2 03-02-2006 05:01 AM
Character encoding H van de Ven Firefox 4 12-30-2004 10:32 PM
changing JVM encoding; setting -Dfile.encoding doesn't work pasmol@plusnet.pl Java 1 10-08-2004 09:50 PM
Encoding.Default and Encoding.UTF8 Hardy Wang ASP .Net 5 06-09-2004 04:04 PM



Advertisments