|
-
Sep 30th, 2007, 05:14 AM
#1
Thread Starter
Arabic Poster
[2005] Porbably an encoding problem
Hi all,
I don't know if my problem is .NET related, SQL Server related or windows related. But I know it's Microsoft related (not blaming or pointing fingers).
Here is my problem:
I have an ASP.NET website running under IIS 6 (Windows 2003) using .NET 2.0 and an SQL Server 2005 DB.
For some reason sometimes the special characters such as ., @ ... show up as %2E, %40... etc and I can't find out why.
Any help is really appreciated
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
Sep 30th, 2007, 02:02 PM
#2
I wonder how many charact
Re: [2005] Porbably an encoding problem
Show up where? IN your database, or on your webpage?
-
Sep 30th, 2007, 08:21 PM
#3
Thread Starter
Arabic Poster
Re: [2005] Porbably an encoding problem
 Originally Posted by nemaroller
Show up where? IN your database, or on your webpage?
On web pages, and specifically when auto filling text boxes
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
Oct 1st, 2007, 07:15 AM
#4
I wonder how many charact
Re: [2005] Porbably an encoding problem
Sounds like you're specifically encoding text and assigning it to a server control in a manner that invokes it to html encode its input - resulting in a double-encoded string. Or probably more disturbing, you have html-encoded data in your database. A simply query of the tables will allow you to make sure.
Try a find search for :
".Text = HttpUtility.HtmlEncode"
Note that certain server controls html encode by default depending on certain properties that are set.
-
Oct 1st, 2007, 08:47 AM
#5
Thread Starter
Arabic Poster
Re: [2005] Porbably an encoding problem
That'd be correct if I was always getting the html code for special characters. but the disturbing thing is this only happens sometimes. Most of the time I get the data correctly.
And to be specific I have 1 DB server, 2 different (windows 2003) hosting servers.
Could this be system settings on one of the servers? Is there a way to find out?
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
Oct 1st, 2007, 09:25 AM
#6
I wonder how many charact
Re: [2005] Porbably an encoding problem
So on the same page, with the same exact data, sometimes the characters are encoded and sometimes they are not? So you're suspicious of a configuration difference between the two 2k3 web servers?
-
Oct 2nd, 2007, 08:18 AM
#7
Re: [2005] Porbably an encoding problem
Start by... comparing the machine.configs on both machines. Use something like windiff. I don't know if that should make a difference though. But try it anyways.
-
Oct 2nd, 2007, 09:20 AM
#8
Thread Starter
Arabic Poster
Re: [2005] Porbably an encoding problem
 Originally Posted by nemaroller
So on the same page, with the same exact data, sometimes the characters are encoded and sometimes they are not? So you're suspicious of a configuration difference between the two 2k3 web servers?
Yes
 Originally Posted by mendhak
Start by... comparing the machine.configs on both machines. Use something like windiff. I don't know if that should make a difference though. But try it anyways.
I'll try that tomorrow, I hope it works
Last edited by ComputerJy; Oct 2nd, 2007 at 12:56 PM.
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
Oct 2nd, 2007, 12:31 PM
#9
Re: [2005] Porbably an encoding problem
Of course it won't. Don't be so optimistic.
Also, I know it's a little anal, but can you post a screenshot of similar scenarios where it's working and where it isn't? Also, when it starts showing weird characters, can you get the HTML source of that rendered page and put it up here, probably in a .txt file.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|