Hi there,
I'm hoping this is the place to submit this, as really I am looking to
resolve the issue before the data is sent to the database.
I have a website, with a textarea, that stores data in an nvarchar(4000)
field, the insert is done via a stored procedure. The data is sent as HTML
Encoded.
This works fine when data is manually entered, however if the user enters
the data by copying and pasting from Word, Notepad, PDF, etc the data is
entered ok, but then doesn't display properly.
The problem seems to be the use of the tab key in the associated program,
for instance -
The data from word looks like this -
"• To hold a Degree with a significant "
The data held on the database then looks like this -
"• To hold a Degree"
Please note the gap between ":" and "To" this doesn't appear to be a space
as it is to big.
The data that is then displayed is -
"•aU"
If i manually remove the gap I get the following -
"•To hold a Degree with a significant " with no gap
Obviously i can't manually do this for every entry, and i deally I still
want to keep the structure of the text, i.e paragraphs.
I think the problem is around ordered and unordered lists from Word etc, and
the tab space between the bullet and first letter, is there anyway to clear
both the un/ordered list and tab space before submitting the data?
I'm using MS SQL 2000
My stored procedure looks like this -
CREATE PROCEDURE NormalAdvert
@EmployeeId int,
@SiteID int,
@ClientId INT,
@JobTitle nvarchar(50),
@Description nvarchar(4000),
@Payrate nvarchar(50),
@location nvarchar(50),
@category nvarchar(50),
@employmenttype nvarchar(50),
@reference nvarchar(50),
@startdate nvarchar(50)
AS
Declare @NewID INT
INSERT INTO dbo.JBAdvert (JBASiteID, JBAEmployeeID, JBAClientID, JBATitle,
JBADescription, JBAPayRate, JBALocation, JBACategory, JBAEmplymentTyp e,
JBAReference, JBAStartDate)
VALUES (@SiteID, @EmployeeId, @ClientId, @JobTitle, @Description, @Payrate,
@location, @category, @employmenttype , @reference, @startdate)
Thank you 2 3103
"GTN170777" <GT*******@disc ussions.microso ft.comwrote in message
news:48******** *************** ***********@mic rosoft.com...
Hi there,
I'm hoping this is the place to submit this, as really I am looking to
resolve the issue before the data is sent to the database.
I have a website, with a textarea, that stores data in an nvarchar(4000)
field, the insert is done via a stored procedure. The data is sent as HTML
Encoded.
This works fine when data is manually entered, however if the user enters
the data by copying and pasting from Word, Notepad, PDF, etc the data is
entered ok, but then doesn't display properly.
The problem seems to be the use of the tab key in the associated program,
for instance -
The data from word looks like this -
"• To hold a Degree with a significant "
The data held on the database then looks like this -
"• To hold a Degree"
Please note the gap between ":" and "To" this doesn't appear to be a space
as it is to big.
The data that is then displayed is -
"•aU"
If i manually remove the gap I get the following -
"•To hold a Degree with a significant " with no gap
Obviously i can't manually do this for every entry, and i deally I still
want to keep the structure of the text, i.e paragraphs.
I think the problem is around ordered and unordered lists from Word etc,
and
the tab space between the bullet and first letter, is there anyway to
clear
both the un/ordered list and tab space before submitting the data?
I'm using MS SQL 2000
My stored procedure looks like this -
CREATE PROCEDURE NormalAdvert
@EmployeeId int,
@SiteID int,
@ClientId INT,
@JobTitle nvarchar(50),
@Description nvarchar(4000),
@Payrate nvarchar(50),
@location nvarchar(50),
@category nvarchar(50),
@employmenttype nvarchar(50),
@reference nvarchar(50),
@startdate nvarchar(50)
AS
Declare @NewID INT
INSERT INTO dbo.JBAdvert (JBASiteID, JBAEmployeeID, JBAClientID, JBATitle,
JBADescription, JBAPayRate, JBALocation, JBACategory, JBAEmplymentTyp e,
JBAReference, JBAStartDate)
VALUES (@SiteID, @EmployeeId, @ClientId, @JobTitle, @Description,
@Payrate,
@location, @category, @employmenttype , @reference, @startdate)
The SQL is not at fault here.
This will be an encoding mismatch between the source page where the form is
placed and the destination page that the data is posted to.
At a guess I would suggest that your form page specifies Response.CharSe t =
"UTF-8" in which case the page that it posts to should be setting the
Response.CodePa ge = 65001 but it currently isn't. This would result in
UTF-8 encoding to accepted as if they were part of an ANSI codepage which
then get stored in the DB.
When you've corrected your receiving page you will need to repair the
corrupt data in the DB.
--
Anthony Jones - MVP ASP/ASP.NET
thank you
"Anthony Jones" wrote:
>
"GTN170777" <GT*******@disc ussions.microso ft.comwrote in message
news:48******** *************** ***********@mic rosoft.com...
Hi there,
I'm hoping this is the place to submit this, as really I am looking to
resolve the issue before the data is sent to the database.
I have a website, with a textarea, that stores data in an nvarchar(4000)
field, the insert is done via a stored procedure. The data is sent as HTML
Encoded.
This works fine when data is manually entered, however if the user enters
the data by copying and pasting from Word, Notepad, PDF, etc the data is
entered ok, but then doesn't display properly.
The problem seems to be the use of the tab key in the associated program,
for instance -
The data from word looks like this -
"• To hold a Degree with a significant "
The data held on the database then looks like this -
"• To hold a Degree"
Please note the gap between ":" and "To" this doesn't appear to be a space
as it is to big.
The data that is then displayed is -
"•aU"
If i manually remove the gap I get the following -
"•To hold a Degree with a significant " with no gap
Obviously i can't manually do this for every entry, and i deally I still
want to keep the structure of the text, i.e paragraphs.
I think the problem is around ordered and unordered lists from Word etc,
and
the tab space between the bullet and first letter, is there anyway to
clear
both the un/ordered list and tab space before submitting the data?
I'm using MS SQL 2000
My stored procedure looks like this -
CREATE PROCEDURE NormalAdvert
@EmployeeId int,
@SiteID int,
@ClientId INT,
@JobTitle nvarchar(50),
@Description nvarchar(4000),
@Payrate nvarchar(50),
@location nvarchar(50),
@category nvarchar(50),
@employmenttype nvarchar(50),
@reference nvarchar(50),
@startdate nvarchar(50)
AS
Declare @NewID INT
INSERT INTO dbo.JBAdvert (JBASiteID, JBAEmployeeID, JBAClientID, JBATitle,
JBADescription, JBAPayRate, JBALocation, JBACategory, JBAEmplymentTyp e,
JBAReference, JBAStartDate)
VALUES (@SiteID, @EmployeeId, @ClientId, @JobTitle, @Description,
@Payrate,
@location, @category, @employmenttype , @reference, @startdate)
The SQL is not at fault here.
This will be an encoding mismatch between the source page where the form is
placed and the destination page that the data is posted to.
At a guess I would suggest that your form page specifies Response.CharSe t =
"UTF-8" in which case the page that it posts to should be setting the
Response.CodePa ge = 65001 but it currently isn't. This would result in
UTF-8 encoding to accepted as if they were part of an ANSI codepage which
then get stored in the DB.
When you've corrected your receiving page you will need to repair the
corrupt data in the DB.
--
Anthony Jones - MVP ASP/ASP.NET
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: reneecccwest |
last post by:
Hello, can anybody share the code for a word counter for the textarea
user input? what if max characters are 256?
thanks
|
by: Lenny Linux |
last post by:
Is there any javascript or html example code I can look at to have an input
button paste windows clipboard data into a textarea.
I'm just a slow in the head tired old man seeking answers to how.
--------------------------------------------
This E-mail was scanned by
|
by: Bani |
last post by:
Is it possible to get browser-menu events (IE) into Javascript?
I have a special copy/paste on the onkeydown event (ctrl+c/ctrl+v). Now
the users would like to trigger it also from the browser menu.
|
by: spectre |
last post by:
Hi,
I need to copy/paste texts form word, notepad... to an html textarea
to store it into a database.
With the <pre>tag, and a text with long lines, the text displayed in
the textarea needs to be scrolled horizontaly within the browser
window: I can't succeed in stopping the text to be larger than the
<table>;<tr>;<td> settings.
|
by: Chris |
last post by:
I am trying to do a mail merge from Access 2000/2002 through VBA to a
Word document. It all works fine on all Windows 2000 machines
(regardless of if it is Office 2000 or 2002) but it doesn't work on
any Windows XP machines. I get a 4605 error and there is no
documentation I can find on this anywhere on the internet. I have
checked file permissions on all files. I get errors on the 2 lines
marked XX. The Word document is not protected. It...
| |
by: trihanhcie |
last post by:
Hi
I have several textarea in the same page. I would like to count the
words in each textarea without any interaction with each other. Here's
the code I used for the count :
<script type="text/javascript">
/*Téléchargé sur Easy-Script.com (http://www.easy-script.com)
Trouvé sur: www.portugal-tchat.com */
|
by: halbenca |
last post by:
Is this possible with Javascript in anyway? :)
|
by: thuythu |
last post by:
Please help me....
I used and Javascript to view the data. But when i click button open a popup windows, then select data and click save button. The popup close and return the main page, but the textbox value in the main page is undefined
----------------------------------------
here are code main page:
-------------------------------------------
<script language="JavaScript">
var thedata;
var newwin;
var thenumber;
function...
|
by: =?Utf-8?B?R1ROMTcwNzc3?= |
last post by:
Hi Guys,
It's been a while, I've got a small problem that I could do with your
expertise on.
As you know (I Think) I build websites for recruitment agencies, part of the
website includes a job board facility and for job form entry I used a normal
form with a normal textbox, however what I'm finding now is that a lot of
recruitment consultants are pasting the job description into the textbox,
which when submitted is resulting in most of...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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,...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |