smartquotes


The Java library for converting "straight" quotes to “curly” quotes

Smart Quotes converts straight ASCII quotes in HTML content to their typographically-correct equivalents.

For example, it converts

"She's a ripper, mate!"

into

“She’s a ripper, mate!”

It is an easy-to-use Java library with no dependencies other than Java 1.5 or higher. To correct quotes in your application which produces HTML, you can simply drop the JAR into your classpath and use it this way:

SmartQuotes smartQuotes = new SmartQuotes(); String educated = smartQuotes.educate("...");

Downloads

Binaries

Version Date Download 1.0 25 April 2009 smartquotes-1.0.jar

Source code

Source code details are available on the http://code.google.com/p/smartquotes/source/checkout'>Source tab.

Related projects

The http://labs.atlassian.com/wiki/display/QUOT/Confluence+Smart+Quotes+Plugin'>Smart Quotes Confluence plugin uses this library to render smart quotes in the Confluence wiki.

Author

Matt Ryall
smartquotes@mattryall.net
http://www.mattryall.net'>http://www.mattryall.net

Credits

John Gruber's http://daringfireball.net/projects/smartypants/'>SmartyPants was the inspiration for this project and provided a lot of guidance with the algorithm and regular expressions.

Project Information

Labels:
java typography quotes smart