smart-quotes

How do I convert Word smart quotes and em dashes in a string?

I have a form with a textarea. Users enter a block of text which is stored in a database. Occasionally a user will paste text from Word containing smart quotes or emdashes. Those characters appear in the database as: –, ’, “ ,†What function should I call on the input string to convert smart quotes to regular quotes and emdashes...

when copy/paste 'hello' from Word into textarea it becomes 018hello 019 after saving

Hi, I have in Word ‘hello’ and when I paste it I get 018hello 019 so the apostrophes turn into these strange characters. The type of web application should not matter as the behaviour is different depending on the workstation I use. I checked with Notepad, Excel and Wordpad and this issue does not occur, only for Word. It should be a...

C# How to replace Microsoft's Smart Quotes with straight quotation marks??

My post below asked what the curly quotation marks were and why my app wouldn't work with them, my question now is how can I replace them when my program comes across them, how can I do this in C#? Are they special characters? curly-quotation-marks-vs-square-quotation-marks-what-gives Thanks ...

SQL to replace smart quotes

Does anyone know a SQL command to replace MS Office smart quotes with their ASCII cousins? I'm using an oracle database and the fields are of type varchar2 ...

iconv gives "Illegal Character" with smart quotes -- how to get rid of them?

I have a MySQL table with 120,000 lines stored in UTF-8 format. There is one field, product name, that contains text with many accents. I need to fill a second field with this same name after converting it to a url-friendly form (ASCII). Since PHP doesn't directly handle UTF-8, I'm using: $value = iconv ('UTF-8', 'ISO-8859-1', $value)...

What made many of the coding websites converting standard " into non standard ” ?

This question is about standard double quote " and non-standard double quote “ & ” Yesterday when I searched for some sample facebook serverfbml codes, and came upon to this http://mahmudahsan.wordpress.com/2008/11/22/facebook-fbml-rendering-in-iframe-application/ okay so it has got what I want, so I copied the code to my project an...

Smart quotes without "breaking" copy and paste?

I really dislike "smart quotes" for one simple reason - when I copy text containing them, it no longer has the original "" as was typed, instead I end up with Unicode symbols. The smart quotes are a visual improvement, so shouldn't really be "baked into" the text, so.. I was wondering, it is possible to display the smart quotes using CS...

MySQL choking on curly (smart) quotes

I'm inserting some data into a database from a form. I'm using addslashes to escape the text (have also tried mysql_real_escape_string with the same result). Regular quotes are escaped, but some other quotes are not. For example, the string: Homer's blood becomes the secret ingredient in Moe’s new beer. is converted to: Homer\...

replace MSWord smart quotes in asp.net webform

I am having a problem where users are composing some large chunks of text in MS Word, then pasting that in to the online form. These get entered into the DB as an upside down ?. What are my options to replace these with standard quotes? ...

Handling Extended ASCII in File Uploads

A website I recently completed with a friend has a gallery where one can upload images and text files. The only accepted text file (to ease development) is .txt and normally goes off without a hitch (or not..) The problems I've encountered are the same of any developer: Microsoft's Extended ASCII. Before outputting the text from the f...

How could ASP server-side code corrupt a smart quote ’ ?

My company just converted many columns from varchar to nvarchar. Now it seems that when we render a smart quote (i.e. ALT+0146 ’) to the screen and then send it back to the SQL Server 2000 database for persistence, the smart quote gets corrupted to - ’ -. My Question: How could ASP server-side code corrupt a smart quote ’ ? EDI...

SmartyPants-PHP not working for string's submitted by post/get?

Finally gave up on my own pretty-quotes function to use SmartyPants-PHP's one-stop SmartyPants() ... except it seems that it doesn't do pretty curly-quotes (just straight quotes) for strings submitted from post forms or get url's. Tested curly quotes to show with SmartyPants on a string defined in the same doc. Replace that string with ...

Cleaning up 'smart' characters from Word in Ruby

I need to clean up various Word 'smart' characters in user input, including but not limited to the following: – EN DASH ‘ LEFT SINGLE QUOTATION MARK ’ RIGHT SINGLE QUOTATION MARK Are there any Ruby functions or libraries for mapping these into their ASCII (near-) equivalents, or do I really need to just do a bunch of...