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 / .NET Framework / New Users / April 2007

Tip: Looking for answers? Try searching our database.

URLDecode differences in NET 1.1 and 2.0

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
samuelhon - 04 Apr 2007 12:06 GMT
Hi all

I'm attempting to decode a string which works fine in 1.1

However, we've now moved the project to 2.0 and its not happy. The
length of the decodedString is different. I've tried changing the
encoding type which is UTF8.

Any thoughts?

Cheers

Sam

string stringToDecrypt = "%eb%81%85%ee%95%b1%eb%b5%a7%e0%a0%b6%ed%bb%8e
%e5%98%b4%ef%bc%97%e4%a3%ab";

string decodedString =
System.Web.HttpUtility.UrlDecode(stringToDecrypt);
Marc Gravell - 05 Apr 2007 11:54 GMT
I'm not sure encoding would be an issue here... could you post the
results (decodedString) you get in 1.1 vs 2.0? Perhaps that might
shine a light...

Marc
samuelhon - 05 Apr 2007 16:17 GMT
> I'm not sure encoding would be an issue here... could you post the
> results (decodedString) you get in 1.1 vs 2.0? Perhaps that might
> shine a light...
>
> Marc

Hi Marc

The decodedString doesnt want to paste in, its all squares and other
characters

I'm more curious about the length of the string which is different

Ta

Sam
Marc Gravell - 06 Apr 2007 20:25 GMT
In that case, can I ask: what is this string holding? it sounds like
it might be holding some raw data, in which case a byte[] (perhaps
expressed in base64) might be a better option.
Peter  Theill - 05 Apr 2007 15:46 GMT
> I'm attempting to decode a string which works fine in 1.1
>
> However, we've now moved the project to 2.0 and its not happy. The
> length of the decodedString is different. I've tried changing the
> encoding type which is UTF8.

Are your '<globalization>' tag in Web.config the same for both
projects? If it's not available in one of them it falls back to a more
global setting (machine.config) so ensure your have a globalization
tag in both of your projects and that there are the same.

Rgd,
Peter Theill
samuelhon - 05 Apr 2007 16:15 GMT
> > I'm attempting to decode a string which works fine in 1.1
>
[quoted text clipped - 9 lines]
> Rgd,
>  Peter Theill

Hi Peter

Thanks for the reply. I've checked the globalization tag and they're
both the same. I've done some tests with the additional Encode
parameter and even if I set it to UTF8 in both frameworks, it still
fails

Very strange

Any other ideas?

Cheers

Sam

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.