--- typogrify.module	2009-04-28 23:49:37.000000000 +0200
+++ typogrify-quotes.module	2010-03-14 02:24:24.000000000 +0100
@@ -134,6 +134,22 @@ function _typogrify_process($text, $form
     }
   }
 
+  // Build a list of punctuation marks to convert.
+  foreach (unicode_conversion_map('punctuation') as $punct => $unicode) {
+    $setting = 'typogrify_use_unicode_for_' . $punct . '_' . $format;
+    if (variable_get($setting, 0) == 1) {
+      $characters_to_convert[] = $punct;
+    }
+  }
+
+  // Build a list of quotation marks to convert.
+  foreach (unicode_conversion_map('quotes') as $quote => $unicode) {
+    $setting = 'typogrify_use_unicode_for_' . $quote . '_' . $format;
+    if (variable_get($setting, 0) == 1) {
+      $characters_to_convert[] = $quote;
+    }
+  }
+
   // Convert ligatures and arrows
   if (count($characters_to_convert) > 0) {
     $text = convert_characters($text, $characters_to_convert);
@@ -231,7 +247,6 @@ function _typogrify_settings($format) {
     );
   }
 
-
   // Arrow conversion settings.
   $form['typogrify_settings']['arrows'] = array(
     '#type' => 'fieldset',
@@ -249,6 +264,40 @@ function _typogrify_settings($format) {
     );
   }
 
+  // Quotes conversion settings.
+  $form['typogrify_settings']['quotes'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Quotes'),
+    '#collapsible' => TRUE,
+    '#collapsed' => TRUE,
+  );
+
+  foreach (unicode_conversion_map('quotes') as $quotes => $unicode) {
+    $setting = 'typogrify_use_unicode_for_'. $quotes .'_'. $format;
+    $form['typogrify_settings']['quotes'][$setting] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Convert @ascii to !unicode', array('@ascii' => $quotes, '!unicode' => $unicode)),
+      '#default_value' => variable_get($setting, 0),
+    );
+  }
+  
+  // Punctuation conversion settings.
+  $form['typogrify_settings']['punctuation'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Punctuation'),
+    '#collapsible' => TRUE,
+    '#collapsed' => TRUE,
+  );
+
+  foreach (unicode_conversion_map('punctuation') as $punct => $unicode) {
+    $setting = 'typogrify_use_unicode_for_'. $punct .'_'. $format;
+    $form['typogrify_settings']['punctuation'][$setting] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Convert @ascii to !unicode', array('@ascii' => $quotes, '!unicode' => $unicode)),
+      '#default_value' => variable_get($setting, 0),
+    );
+  }
+
   // Version Information Settings
   $version_strings = array();
   $version_strings[] = t('SmartyPants PHP version: !version', array('!version' => l(SMARTYPANTS_PHP_VERSION, 'http://www.michelf.com/projects/php-smartypants/')));
