Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Encoding utf-8 - reading

Status
Not open for further replies.

M8KWR1

IS-IT--Management
Dec 8, 2008
20
0
0
GB
Unsure if this is the correct place to ask this question, but i have this code
Code:
   Dim IPNResponseStream As Stream = strResponse.GetResponseStream
        Dim encode As Encoding = System.Text.Encoding.GetEncoding("utf-8")
        Dim readStream As New StreamReader(IPNResponseStream, encode)

        'read the response into a String variable "temp"
        temp = readStream.ReadToEnd

Which read the response and then i have some other code which splits it all down line by line.

Is there a simple way to convert the text to a readable manner, example 04%3A05%3A49+Dec+19%2C+2008+PST - should be a date, and the + symbol means a space.

Any help or guidance would be great, thanks in advance.
 
seems straightforward on the face of it - there have been a few of these kinds of questions lately
Code:
temp = temp.Replace("%3A", "/").Replace("+", " ").Replace("%2C", "?")
i dont know precisely the format you want out but i'm sure you get the drift
 
just checked what those characters are try this
Code:
TextBox3.Text = TextBox2.Text.Replace("%3A", ":").Replace("+", " ").Replace("%2C", ",")

hex3A is a ':' and hex2C is a ','
 
I do have more things i will need to replace, does anyone know of website which displays them all to me

Many thanks for your help so far.
 
it is just the standard ascii codes as a hexnumber - i suppose you could write a routine to loop around all the possible %nn's i suppose

here's a website with the standard ascii codes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top