views:

24

answers:

1

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 manual gsubs?

A: 

Some gsubs sound like the best bet, especially if you're planning to load an entire extra library to do basically the same thing.

joeldt