Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9218935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:58:52+00:00 2026-06-18T02:58:52+00:00

I have an ASP Classic app that allows people to copy and paste Word

  • 0

I have an ASP Classic app that allows people to copy and paste Word documents into a regular form field. I then post that document via jQuery Ajax to SQL Server, where the information is saved.

My problem is that the curly quotes and other word characters turn into strange characters when they come back out.

I’m trying to filter them on my save routines (classic asp stored procedure), but I still can’t quite eliminate the problems.

The ASP pages have this header with the ISO-8859-1 charset. Characters look fine when pasted into the text input fields.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

My jQuery code builds the following JSON in the ASP Page:

var jsonToSend = { serial: serial, critiqueText: escape(critiqueText) };

The database collation is set to SQL_Latin1_General_CP1_CI_AS

I use TEXT and VARCHAR fields to hold the text (yes, I know the Text field type is not preferred, but it’s what I have right now).

What must I do at each point to ensure that (1) the Word characters are stripped out, and (2) the encoding is consistent from front to back so I don’t get any odd characters displaying?

Oh- ASP Classic 3 running in 32-bit mode on Windows Server 2003 against SQL Server 2005.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T02:58:53+00:00Added an answer on June 18, 2026 at 2:58 am

    Quick and dirty solution would be using nvarchar and ntext in your backend database. Strange chars you mention is problem of encoding. For example see below example.

    • İiıIÜĞ in turkish language win-1254
    • İiıIÃœÄ in normal ANSI
    • C4B069C4B149C39CC49E both of them have same hex value.

    You use ISO-8859-1 encoding in web page. This means that you are only able to save only ASCII characters that is only first 256 bit of full unicode. See this answer.
    You use Latin1 in database. Approximately this three characters sets are equal. Latin1-General = Win 1252 = IEC_8859-1.

      ISO/IEC_8859-1 is the basis for most popular 8-bit character sets, including Windows-1252 and the first block of characters in Unicode.
    
      SQL_Latin1_General_CP1_CI_AS:- Latin1-General, case-insensitive, accent-sensitive, kanatype-insensitive, 
      width-insensitive for Unicode Data, SQL Server Sort Order 52 on Code Page 1252 for non-Unicode Data
    

    This means that whatever character you entered to database first 256 bits values are safe. If you know your client’s default encodings.
    I suggest to try this default encoding to see if you can recover some information.
    I gave example in Turkey, I know that most client’s use Win1254 therefore I will try to change values to that encoding and see I can recover anything.

    Second part of your answer is that you can safely change from varchar to nvarchar without loss of information.
    Here this without loss of information would be first part hex value (first 256 value).
    Your strange chars would remain but other characters stays.

    This answer and linked article gives more information.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a SQL interface page in my classic ASP web app that allows
I have a classic ASP application which inserts some values into a word file
I have a classic ASP (vbscript) web app that connect to an SQL server.
I have a ASP.NET website that requires my App Pool be the Classic .Net
I have a web app in classic ASP that most run at all times.
I have a classic ASP app that I am trying to connect to a
I have a large classic ASP app that I have to maintain, and I
We have an old web app written in classic ASP. We don't have the
We have a classic ASP site that is been hosted in IIS 7.5. I
i have a contact form sending itself to me by email using ASP classic,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.