473,662 Members | 2,376 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

URLDecode differences in NET 1.1 and 2.0

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%9 5%b1%eb%b5%a7%e 0%a0%b6%ed%bb%8 e
%e5%98%b4%ef%bc %97%e4%a3%ab";

string decodedString =
System.Web.Http Utility.UrlDeco de(stringToDecr ypt);

Apr 4 '07 #1
5 2142
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
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
On 5 Apr, 15:46, "Peter Theill" <the...@gmail.c omwrote:
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
On 5 Apr, 11:54, "Marc Gravell" <marc.grav...@g mail.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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
33510
by: Thomas Henz | last post by:
Hi again, can anyone tell me why it says that the object doesnt support this method? rs is a db query resultset. msg is a db field with urlencoded data in it. ------------ if not rs.eof then do while not rs.eof response.write(server.urldecode(rs("msg")))
0
1393
by: Yifan | last post by:
Hi I want to use UrlDecode() in C++. I have a Win32 Visual C++ (.NET) project #using <mscorlib.dll #using <System.dll #using <System.Web.dll using namespace System using namespace System::Web
1
1992
by: João Santa Bárbara | last post by:
hi all is there any replace for the System.Web.HttpUtility.UrlDecode to windows forms ... thks JSB
4
3426
by: John Hoge | last post by:
Hi, I need to UrlDecode a string in a simple console application, but I am having trouble accessing Server.UrlDecode, even though System.Web is included. The application pulls a text out of a referring URL string and (eventually) will run a simple report. Here is an excerpt of my code: using System;
6
12012
by: John Grandy | last post by:
Does Server.URLDecode() need to be applied to Request.QueryString(<key name>) ?
10
5872
by: Alex | last post by:
Hi, I UrlEncode a value that I put in my querystring. This value originally contains the character "è", which is UrlEncoded to "%E8". When I try to read the value from the querystring, I find out that the character now is "%u00c3%u00a8" in the querystring and thus does not urldecode to the original character, which is a problem. My site is using CMS. Any idea what is going on? Thank you for any support,
1
2118
by: fjm67 | last post by:
I see Google edited my email address. Lets try this. captonline at yahoo dot com Can you guys help me out please? I need to implement urldecode into a php script and don't know how. Here is the string I need to include it into. $this->get_category_dropdown($db,"d",$show->CATEGORY,1);
20
3491
by: gert | last post by:
This based on a example i found at http://www.cs.tut.fi/~jkorpela/ forms/cgic.html #include <fcgi_stdio.h> #include <stdlib.h> int urldecode(char *src, char *last, char *dest){ int code; for (; src != last; src++, dest++){ if (*src == '+') *dest = ' ';
3
26261
by: gert | last post by:
Anybody can tell me what i need to import to make urlDecode() work in python2.5 please. import urllib urllib.urlDecode(post) #doesn't exist urllib.urldecode(post) #doesn't exist urldecode(post) #doesn't exist urlDecode(post) #doesn't exist
0
8432
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8343
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7365
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6185
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5653
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4179
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4347
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1747
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.