By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,244 Members | 1,772 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,244 IT Pros & Developers. It's quick & easy.

URLDecode differences in NET 1.1 and 2.0

P: n/a
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);

Apr 4 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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

Apr 5 '07 #2

P: n/a
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

Apr 5 '07 #3

P: n/a
On 5 Apr, 15:46, "Peter Theill" <the...@gmail.comwrote:
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
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

Apr 5 '07 #4

P: n/a
On 5 Apr, 11:54, "Marc Gravell" <marc.grav...@gmail.comwrote:
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

Apr 5 '07 #5

P: n/a
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.

Apr 6 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.