Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / March 2008

Tip: Looking for answers? Try searching our database.

problem with passing string with special character

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bob - 19 Mar 2008 20:35 GMT
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:
---------
enqna = Request.QueryString("Item0")

=> this gives: enqu
Cowboy (Gregory A. Beamer) - 19 Mar 2008 21:00 GMT
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

Signature

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!

*************************************************
> Hi,
>
[quoted text clipped - 14 lines]
>
> => this gives: enqu
bruce barker - 19 Mar 2008 21:11 GMT
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)

> Hi,
>
[quoted text clipped - 14 lines]
>
> => this gives: enqu
Bob - 19 Mar 2008 23:18 GMT
Thanks

> uri's (url) only support a subset of ascii, no international characters.
> you
[quoted text clipped - 26 lines]
>>
>> => this gives: enqu

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.