2

I have a web page with text input fields. If the user pastes text from a Microsoft product (Word, Outlook) the long dashes (m dashes?) and apostrophes (or single quotes) are getting converted to question marks (?) when written to my database table. If they just enter text directly from the keyboard it's fine. How can I prevent or correct this issue?

My JSP page has this above the starting tag:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>

My Microsoft SQL 2012 Server default collation is set to:

SQL_Latin1_General_CP1_CI_AS

How can I fix this going forward?

Thanks!

1
  • Should I be using UTF-8 instead of ISO-8859-1 in my web application? Although this seemed to make the problem worse. Commented Oct 5, 2012 at 13:57

1 Answer 1

2

This should take you to the right direction

http://balusc.blogspot.com/2009/05/unicode-how-to-get-characters-right.html

or

http://www.tek-tips.com/viewthread.cfm?qid=268377

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.