473,591 Members | 2,810 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Does anyone know? Please Read [Third Attempt]

If you got the answer, thank you so much.
OK I have to ask this question again as I know it can’t be that
difficult, nor is it that rare. So a lot of people are doing something
wrong, but what are we doing wrong?
Someone types text in Ms Word, say a blog entry or forum post, then
they cut that text out of word and past it into a form on the web and
submit it. It get written to SQL Server.
The problem, word takes a single quote character #39 and turns it into
#146 in most cases, by default.

You then use a method let’s say GetDataSet() and work with that
data. The text is messed up: "It’s" becomes "it’ s" This is
NOT a problem when using a DataReader, but when you return a DataSet...
XML you get this behavior.
Example
I have searched the web for the afore mention characters and found that
"many" web sites are displaying text in this manner For example here is
one that does so:
http://www.artima.com/forums/flat.js...&thread=159914

The first paragraph starts off this way:

“Using ASP.NET 2.0’s new GridView control with the new
ObjectDataSourc e ”

same messed up text in firefox
Using ASP.NET 2.0’s new GridView control with the new
ObjectDataSourc e allows

Nov 29 '06 #1
1 1138
What exactly are you asking? When you paste into a textarea, you are pasting
into a browser form element that accepts only pure text. How the formatted
text is "translated " into pure text is a function of the user's operating
system and/or the browser, of which there are many of both operating
systems, browsers, and system configurations on the Internet.

Therefore, there is no way to know from one form post to another what has
been sent from the user's computer to the server. The form data that arrives
on the server is pure text. The server cannot know whether what arrives is
what was intended by the user. It only knows what text it has received. It
faithfully handles the text data exactly as it was sent by the user. That is
all it can do.

In other words, GIGO - Garbage in, Garbage out. While is is possible to
create software that is intelligent enough to figure out all of these
things, it certainly hasn't been done yet, and is cost-prohibitve. What
you're describing is some fairly advanced artificial intelligence. Even if
Microsoft or some other software company were to come up with such software,
the cost of creating it would make it too expensive for most people to buy.

At some point, regardless, it is the user's responsibility to use their
software correctly. The idea that computers can be so smart as to figure out
the intentions of the user regardless of the input, and to correct any
possible mistakes made by the user is a pipe dream. If the day comes when
computers are as good at fuzzy logic as humans are, they will most likely
become as unreliable as humans are. No matter how smart computers become,
people are highly likely to keep out-dumbing them.

--
HTH,

Kevin Spencer
Microsoft MVP
Virtual Carpenter
http://unclechutney.blogspot.com

Paranoia is a state of mind.
"DaBrain" <Ta**********@g mail.comwrote in message
news:11******** **************@ h54g2000cwb.goo glegroups.com.. .
If you got the answer, thank you so much.
OK I have to ask this question again as I know it can't be that
difficult, nor is it that rare. So a lot of people are doing something
wrong, but what are we doing wrong?
Someone types text in Ms Word, say a blog entry or forum post, then
they cut that text out of word and past it into a form on the web and
submit it. It get written to SQL Server.
The problem, word takes a single quote character #39 and turns it into
#146 in most cases, by default.

You then use a method let's say GetDataSet() and work with that
data. The text is messed up: "It's" becomes "it?Ts" This is
NOT a problem when using a DataReader, but when you return a DataSet...
XML you get this behavior.
Example
I have searched the web for the afore mention characters and found that
"many" web sites are displaying text in this manner For example here is
one that does so:
http://www.artima.com/forums/flat.js...&thread=159914

The first paragraph starts off this way:

"Using ASP.NET 2.0’s new GridView control with the new
ObjectDataSourc e "

same messed up text in firefox
Using ASP.NET 2.0’s new GridView control with the new
ObjectDataSourc e allows
Nov 29 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
2527
by: lawrence | last post by:
I'm learning Javascript. I downloaded a script for study. Please tell me how the variable "loop" can have scope in the first function when it is altered in the second function? It is not defined in global space, therefore it is not a global variable, yes? Even if it was global, how would it get from one function to another? In PHP variables are copied by value. Are they copied by reference in Javascript? <SCRIPT LANGUAGE="JavaScript">
13
5029
by: Jason Huang | last post by:
Hi, Would someone explain the following coding more detail for me? What's the ( ) for? CurrentText = (TextBox)e.Item.Cells.Controls; Thanks. Jason
2
5411
by: rrossney | last post by:
Please look at the "what I've already done" section of this message before responding to it: I believe that I've done everything that the people who experience this error are typically told to do. I have created an ASP.NET web service that I have running on my development machine, and am trying to get it to run on my test server. Both machines are running Windows 2000 SP4, IIS 5, and the .NET 2.0 framework. When I attempt to access...
2
6565
by: Patti | last post by:
I am building an application using VB.NET 1.1 and I have an issue with Font properties in my Radio Button Lists and Check Box Lists. My issue is that the Font Names and Font Size for these controls have become "Read Only" and I have no idea how they became read only. I didn't set anything to read only and was able to change these fonts just last week - so I must have messed something up. Below is a snippet of my HTML code I used...
130
6490
by: Daniel Manes | last post by:
I'm baffled. I have a column in a SQL Server Express database called "Longitude," which is a float. When I view the table in a DataGridView, some of the numbers, which only have two decimal places in the database show up with *15* decimal places and are ever so slightly off (in the example in the subject line, by about 2E-15). I'm not doing any operations on this column. It's just running a stored procedure which performs a pretty basic...
2
1527
by: Greg Scharlemann | last post by:
The last time I tried to ask this question...Google Groups screwed up my message and there was no subject (sorry for that - I know it's annoying). I'm trying to learn how to develop a plug-in that allows users to display data from one site in a third party site, like Google Adwords or the Digg counter for news stories. I took a look at Digg.com and found the following: It looks like digg is doing the following to show the number of...
4
1875
by: skatemore9690 | last post by:
#1 in Calculus you learned that log(1+x) = x - x^2/2 + x^3/3 - x^4/4 + ... for x in the interval (-1,1] (here x^2 means "x squared", etc.). Write a program which asks the user to type a number in the interval and then calculates the natural logarithm of that number using this series with 6 decimal places accuracy (you can use the alternating harmonic series program as a template).
19
2415
by: active | last post by:
The ColorPalette class has no constructor so how does one use it? I define a variable by: Dim cp as ColorPalette but don't know how assign an object to the variable. Thanks in advance
1
2037
by: Blubaugh, David A. | last post by:
Pauli, Yes, I am utilizing the windows environment. I cannot install f2py. I obtain the following error when I try to execute the setup.py file within the f2py folder located within the numpy master folder: Warning: Assuming default configuration
0
7870
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
8236
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
7992
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8225
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
6639
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 projectplanning, coding, testing, and deploymentwithout 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...
0
3850
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
3891
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1465
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1199
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.