473,385 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Problem Encoding to ISO-8859-1

Hi

I'm trying to encode string to ISO-8859-1 and after send this data to a webservice.

I'm using VB.NET 2008.

I have the next code. It runs fine excepts the character +

Expand|Select|Wrap|Line Numbers
  1. baseurl = "http://www.myweb.com/api/sendsms.php"
  2.             client = New WebClient
  3.             client.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)")
  4.             client.QueryString.Add("user", user)
  5.             client.QueryString.Add("password", pass)
  6.             client.QueryString.Add("alias", myAlias)
  7.             client.QueryString.Add("dest",  mobile)
  8.             textoSms = Me.mmTexto.Text
  9.             textoSms = System.Web.HttpUtility.UrlEncode(textoSms, System.Text.Encoding.GetEncoding("ISO-8859-1"))                
  10.             client.QueryString.Add("message", textoSms)
  11.             data = client.OpenRead(baseurl)
  12.             reader = New StreamReader(data)
  13.             s = reader.ReadToEnd()
  14.             data.Close()
  15.             reader.Close()

Example:

original string: 50+50
string encoded to iso 8859-1: 50%2b50
webservice receives: 5050

Any help?
Dec 3 '09 #1
0 1103

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Thomas Sommer | last post by:
Hi group, I am really desperate but I think I am missing only a minor part. Basically I want to pipe a global entity (the one you dereference with the &) through my dtd into the xml-file I am...
2
by: Dale Gerdemann | last post by:
I'm having trouble with Unicode encoding in DOM. As a simple example, I read in a UTF-8 encoded xml file such as: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <aText>letter 'a' with...
48
by: Zenobia | last post by:
Recently I was editing a document in GoLive 6. I like GoLive because it has some nice features such as: * rewrite source code * check syntax * global search & replace (through several files at...
5
by: DbNetLink | last post by:
I am trying to convert some Japanese text encoded as Shift-JIS/ISO-2022-JP to UTF-8 so I can store all data in my database with a common encoding. My problem is the encoding conversion code works...
9
by: Andy | last post by:
I am trying to write a for loop that will print all the ISO-Latin characters to a database. However: I am not sure exactly how to go about printing the ISO-Latin character set. Would anyone be...
9
by: Mark | last post by:
I've run a few simple tests looking at how query string encoding/decoding gets handled in asp.net, and it seems like the situation is even messier than it was in asp... Can't say I think much of the...
0
by: yuvalbra | last post by:
Hello , I work with asp and send email by cdonts and want to get in in 1255 ISO-Logical encoding every email i got the numbers shows backwords , i need to goto to encoding and replace to...
8
by: patrik.nyman | last post by:
Consider the following document: <?xml version="1.0"?> <!DOCTYPE test> <test> <list type="index"> <item>A</item> <item>B</item> <item>C</item> <cb/>
4
by: kettle | last post by:
Hi, I am rather new to python, and am currently struggling with some encoding issues. I have some utf-8-encoded text which I need to encode as iso-2022-jp before sending it out to the world. I am...
8
by: lisa1987i | last post by:
I am really having trouble with encoding characters. The application I am creating i based on a NNTP component from Smilla smilla.ru My propblem is when I read a string which contain special...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.