problem with passing string with special character

B

Bob

Hi,

I want to pass a string with a special character (ê).
The problem is that the starting string "enquête" arrives as "enqu".

Why is this and how to solve that?
Thanks
Bob

Dim enqna As String
enqna = "enquête"
Response.Redirect(String.Format("next.aspx?Item0={0}", enqna))

next.aspx:
 
C

Cowboy \(Gregory A. Beamer\)

You need to URL encode the string before adding to Response.Redirect.

HttpUtility.UrlEncode(enqna)

You will see ê as a UNIX char. Not sure what, but it will be in the format
&###; so the url will be:

http://mysite.com/next.aspx?Item0=enqu&###;te

with the ### being some number

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

*************************************************
| Think outside the box!
|
*************************************************
 
B

bruce barker

uri's (url) only support a subset of ascii, no international characters. you
will to urlencode the characters, and be sure to use the correct encoding on
the decode side. see HttpUtility.UrlEncode

also see:

ftp://ftp.isi.edu/in-notes/rfc2396.txt


-- bruce (sqlwork.com)
 
B

Bob

Thanks

bruce barker said:
uri's (url) only support a subset of ascii, no international characters.
you
will to urlencode the characters, and be sure to use the correct encoding
on
the decode side. see HttpUtility.UrlEncode

also see:

ftp://ftp.isi.edu/in-notes/rfc2396.txt


-- bruce (sqlwork.com)
 

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

Top