Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Smart Quotes - Unicode problems with SQL Server

Status
Not open for further replies.

faust13

Programmer
Aug 7, 2001
176
US
I have an application that is posting data to a web page via a post request, which then inserts the data into SQL Server. If my users type in quotes (single or double), it creates a unicode friendly quote. However if they cut and paste a quote from a MS Word document (or any MS application), it preserves the smart quotes.

It looks like .Net uses Unicode internally, but does not substitute for smart quotes during data exchange.

Is there any way to suspend this "smart" quote behaviour?

Cheers. --------------------------------------
Is George Lucas Kidding...
Noise Core: 7.62
 
No. Because once the text is pasted into your web form's text box, they're valid Unicode characters. The only reason the quotes are "smart", is because MSWord makes them that way.

If it really irks you, you could write code that looks for the normal single & double-quotes, and then backs up, looking for the reversed single & double quotes, changing them to the other kind. Could get tricky, especially if your users leave one of them off by accident.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top