Answers.Body: <p>I don't think the problem is with the Typogrify plugin, but rather with the original source of the text. I have seen something similar before on a site that didn't use the Typogrify plugin.</p>
  
  <p>The problem comes from multi-byte or high-order unicode characters in the original text that has been pasted into the Redactor field in Craft. In the case I dealt with recently, these had come from Word and had not been stripped out by Redactor when the text was pasted in.</p>
  
  <p>Cleaning up the pasted-in text solved the issue for us.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-17T15:32:57.553Z
Answers.Text: Thanks, Steve - I'll try that. We did try copy and pasting into an editor to remove formatting but that didn't seem to work.
Answers.UserDisplayName: Dan Lee
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-17T15:35:01.480Z
Answers.Text: The quickest way around it for me was to re-type the text and try to persuade the client not to use Word any more!
Answers.UserDisplayName: Steve Rowling
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-17T13:58:30.037Z
Answers.LastActivityDate: 2019-05-17T13:58:30.037Z
Answers.UserDisplayName: Steve Rowling
Body: <p>We noticed that some of the text wrapped in the Typogrify plugin has spaces removed and gets bunched up. Removing the Typogrify filter fixes the issue but we are keen to retain the filters for the plugins great features.</p>
  
  <p>Example: <code>to innovate means ​“to use a new​idea or​method”.</code></p>
  
  <p>Example Page: <a href="https://123innovation.co.uk/blog/the-difference-between-invention-and-innovation" rel="nofollow noreferrer">https://123innovation.co.uk/blog/the-difference-between-invention-and-innovation</a></p>
  
  <pre><code>use \PHP_Typography\Settings\Dash_Style;
  use \PHP_Typography\Settings\Quote_Style;
  
  /**
   * Typogrify config.php
   *
   * This file exists only as a template for the Typogrify settings.
   * It does nothing on its own.
   *
   * Don't edit this file, instead copy it to 'craft/config' as 'typogrify.php'
   * and make your changes there to override default settings.
   *
   * Once copied to 'craft/config', this file will be multi-environment aware as
   * well, so you can have different settings groups for each environment, just as
   * you do for 'general.php'
   */
  
  return [
      // sets tags where typography of children will be untouched
      "set_tags_to_ignore" =&gt; [
          "code",
          "head",
          "kbd",
          "object",
          "option",
          "pre",
          "samp",
          "script",
          "noscript",
          "noembed",
          "select",
          "style",
          "textarea",
          "title",
          "var",
          "math"
      ],
  
      // sets classes where typography of children will be untouched
      "set_classes_to_ignore" =&gt; [
          "vcard",
          "noTypo"
      ],
  
      // sets IDs where typography of children will be untouched
      "set_ids_to_ignore" =&gt; [
      ],
  
      // curl quotemarks
      "set_smart_quotes" =&gt; true,
  
      // Primary quotemarks style
      // allowed values for $style
      //  "doubleCurled" =&gt; "&amp;ldquo;foo&amp;rdquo;",
      //  "doubleCurledReversed" =&gt; "&amp;rdquo;foo&amp;rdquo;",
      //  "doubleLow9" =&gt; "&amp;bdquo;foo&amp;rdquo;",
      //  "doubleLow9Reversed" =&gt; "&amp;bdquo;foo&amp;ldquo;",
      //  "singleCurled" =&gt; "&amp;lsquo;foo&amp;rsquo;",
      //  "singleCurledReversed" =&gt; "&amp;rsquo;foo&amp;rsquo;",
      //  "singleLow9" =&gt; "&amp;sbquo;foo&amp;rsquo;",
      //  "singleLow9Reversed" =&gt; "&amp;sbquo;foo&amp;lsquo;",
      //  "doubleGuillemetsFrench" =&gt; "&amp;laquo;&amp;nbsp;foo&amp;nbsp;&amp;raquo;",
      //  "doubleGuillemets" =&gt; "&amp;laquo;foo&amp;raquo;",
      //  "doubleGuillemetsReversed" =&gt; "&amp;raquo;foo&amp;laquo;",
      //  "singleGuillemets" =&gt; "&amp;lsaquo;foo&amp;rsaquo;",
      //  "singleGuillemetsReversed" =&gt; "&amp;rsaquo;foo&amp;lsaquo;",
      //  "cornerBrackets" =&gt; "&amp;#x300c;foo&amp;#x300d;",
      //  "whiteCornerBracket" =&gt; "&amp;#x300e;foo&amp;#x300f;",
      "set_smart_quotes_primary" =&gt; Quote_Style::DOUBLE_CURLED,
  
      // Secondary quotemarks style
      // allowed values for $style
      //  "doubleCurled" =&gt; "&amp;ldquo;foo&amp;rdquo;",
      //  "doubleCurledReversed" =&gt; "&amp;rdquo;foo&amp;rdquo;",
      //  "doubleLow9" =&gt; "&amp;bdquo;foo&amp;rdquo;",
      //  "doubleLow9Reversed" =&gt; "&amp;bdquo;foo&amp;ldquo;",
      //  "singleCurled" =&gt; "&amp;lsquo;foo&amp;rsquo;",
      //  "singleCurledReversed" =&gt; "&amp;rsquo;foo&amp;rsquo;",
      //  "singleLow9" =&gt; "&amp;sbquo;foo&amp;rsquo;",
      //  "singleLow9Reversed" =&gt; "&amp;sbquo;foo&amp;lsquo;",
      //  "doubleGuillemetsFrench" =&gt; "&amp;laquo;&amp;nbsp;foo&amp;nbsp;&amp;raquo;",
      //  "doubleGuillemets" =&gt; "&amp;laquo;foo&amp;raquo;",
      //  "doubleGuillemetsReversed" =&gt; "&amp;raquo;foo&amp;laquo;",
      //  "singleGuillemets" =&gt; "&amp;lsaquo;foo&amp;rsaquo;",
      //  "singleGuillemetsReversed" =&gt; "&amp;rsaquo;foo&amp;lsaquo;",
      //  "cornerBrackets" =&gt; "&amp;#x300c;foo&amp;#x300d;",
      //  "whiteCornerBracket" =&gt; "&amp;#x300e;foo&amp;#x300f;",
      "set_smart_quotes_secondary" =&gt; Quote_Style::SINGLE_CURLED,
  
      // replaces "a--a" with En Dash " -- " and "---" with Em Dash
      "set_smart_dashes" =&gt; true,
  
      // Sets the typographical conventions used by smart_dashes.
      //
      // Allowed values for $style:
      // - "traditionalUS"
      // - "international"
      "set_smart_dashes_style" =&gt; Dash_Style::TRADITIONAL_US,
  
      // replaces "..." with "…"
      "set_smart_ellipses" =&gt; true,
  
      // replaces "creme brulee" with "crème brûlée"
      "set_smart_diacritics" =&gt; true,
  
      // defines hyphenation language for text
      "set_diacritic_language" =&gt; "en-US",
  
      // $customReplacements must be
      //      an array formatted array(needle=&gt;replacement, needle=&gt;replacement...), or
      //      a string formatted `"needle"=&gt;"replacement","needle"=&gt;"replacement",...`
      "set_diacritic_custom_replacements" =&gt; [
      ],
  
      // replaces (r) (c) (tm) (sm) (p) (R) (C) (TM) (SM) (P) with ® © ™ ℠ ℗
      "set_smart_marks" =&gt; true,
  
      // replaces 1*4 with 1x4, etc.
      "set_smart_math" =&gt; false,
  
      // replaces 2^4 with 2&lt;sup&gt;4&lt;/sup&gt;
      "set_smart_exponents" =&gt; true,
  
      // replaces 1/4  with &lt;sup&gt;1&lt;/sup&gt;&amp;#8260;&lt;sub&gt;4&lt;/sub&gt;
      "set_smart_fractions" =&gt; false,
  
      // wrap numbers in &lt;span class="numbers"&gt;
      "set_smart_ordinal_suffix" =&gt; false,
  
      // single character words are forced to next line with insertion of &amp;nbsp;
      "set_single_character_word_spacing" =&gt; true,
  
      // fractions are kept together with insertion of &amp;nbsp;
      "set_fraction_spacing" =&gt; true,
  
      // units and values are kept together with insertion of &amp;nbsp;
      "set_unit_spacing" =&gt; true,
  
      // Enables/disables extra whitespace before certain punction marks, as is the French custom.
      "set_french_punctuation_spacing" =&gt; false,
  
      // a list of units to keep with their values
      "set_units" =&gt; [
      ],
  
      // Em and En dashes are wrapped in thin spaces
      "set_dash_spacing" =&gt; true,
  
      // Remove extra space characters
      "set_space_collapse" =&gt; true,
  
      // Enable usage of true "no-break narrow space" (&amp;#8239;) instead of the normal no-break space (&amp;nbsp;).
      "set_true_no_break_narrow_space" =&gt; false,
  
      // enables widow handling
      "set_dewidow" =&gt; true,
  
      // establishes maximum length of a widows that will be protected
      "set_max_dewidow_length" =&gt; 5,
  
      // establishes the maximum number of words considered for dewidowing.
      "set_dewidow_word_number" =&gt; 1,
  
      // establishes maximum length of pulled text to keep widows company
      "set_max_dewidow_pull" =&gt; 8,
  
      // enables wrapping at hard hyphens internal to a word with the insertion of a zero-width-space
      "set_wrap_hard_hyphens" =&gt; true,
  
      // enables wrapping of urls
      "set_url_wrap" =&gt; true,
  
      // enables wrapping of email addresses
      "set_email_wrap" =&gt; true,
  
      // establishes minimum character requirement after a url wrapping point
      "set_min_after_url_wrap" =&gt; 5,
  
      // wrap ampersands in &lt;span class="amp"&gt;
      "set_style_ampersands" =&gt; true,
  
      // wrap caps in &lt;span class="caps"&gt;
      "set_style_caps" =&gt; true,
  
      // wrap initial quotes in &lt;span class="quo"&gt; or &lt;span class="dquo"&gt;
      "set_style_initial_quotes" =&gt; true,
  
      // wrap numbers in &lt;span class="numbers"&gt;
      "set_style_numbers" =&gt; true,
  
      // sets tags where initial quotes and guillemets should be styled
      "set_initial_quote_tags" =&gt; [
          "p",
          "h1",
          "h2",
          "h3",
          "h4",
          "h5",
          "h6",
          "blockquote",
          "li",
          "dd",
          "dt"
      ],
  
      // enables hyphenation of text
      "set_hyphenation" =&gt; false,
  
      // defines hyphenation language for text
      "set_hyphenation_language" =&gt; "en-US",
  
      // establishes minimum length of a word that may be hyphenated
      "set_min_length_hyphenation" =&gt; 5,
  
      // establishes minimum character requirement before a hyphenation point
      "set_min_before_hyphenation" =&gt; 3,
  
      // establishes minimum character requirement after a hyphenation point
      "set_min_after_hyphenation" =&gt; 2,
  
      // allows/disallows hyphenation of title/heading text
      "set_hyphenate_headings" =&gt; true,
  
      // allows hyphenation of strings of all capital characters
      "set_hyphenate_all_caps" =&gt; true,
  
      // allows hyphenation of strings of all capital characters
      "set_hyphenate_title_case" =&gt; true,
  
      // defines custom word hyphenations
      // expected input is an array of words with all hyphenation points marked with a hard hyphen
      "set_hyphenation_exceptions" =&gt; [
      ],
  
      // Enable lenient parser error handling (HTML is "best guess" if enabled).
      "set_ignore_parser_errors" =&gt; true,
  
      // Sets an optional handler for parser errors. Invalid callbacks will be silently ignored
      "set_parser_errors_handler" =&gt; null,
  ];
  </code></pre>
  
Tags: <craft3><plugin-typogrify>
Title: Typogrify Plugin - Spaces getting removed?
ThreadText: # Typogrify Plugin - Spaces getting removed?
  
  (Asked by: username_0 on 2019-05-14)
  
  We noticed that some of the text wrapped in the Typogrify plugin has spaces removed and gets bunched up. Removing the Typogrify filter fixes the issue but we are keen to retain the filters for the plugins great features.
  
  Example: `to innovate means ​“to use a new​idea or​method”.`
  
  Example Page: <https://123innovation.co.uk/blog/the-difference-between-invention-and-innovation>
  
  ```
  use \PHP_Typography\Settings\Dash_Style;
  use \PHP_Typography\Settings\Quote_Style;
  
  /**
   * Typogrify config.php
   *
   * This file exists only as a template for the Typogrify settings.
   * It does nothing on its own.
   *
   * Don't edit this file, instead copy it to 'craft/config' as 'typogrify.php'
   * and make your changes there to override default settings.
   *
   * Once copied to 'craft/config', this file will be multi-environment aware as
   * well, so you can have different settings groups for each environment, just as
   * you do for 'general.php'
   */
  
  return [
      // sets tags where typography of children will be untouched
      "set_tags_to_ignore" => [
          "code",
          "head",
          "kbd",
          "object",
          "option",
          "pre",
          "samp",
          "script",
          "noscript",
          "noembed",
          "select",
          "style",
          "textarea",
          "title",
          "var",
          "math"
      ],
  
      // sets classes where typography of children will be untouched
      "set_classes_to_ignore" => [
          "vcard",
          "noTypo"
      ],
  
      // sets IDs where typography of children will be untouched
      "set_ids_to_ignore" => [
      ],
  
      // curl quotemarks
      "set_smart_quotes" => true,
  
      // Primary quotemarks style
      // allowed values for $style
      //  "doubleCurled" => "&ldquo;foo&rdquo;",
      //  "doubleCurledReversed" => "&rdquo;foo&rdquo;",
      //  "doubleLow9" => "&bdquo;foo&rdquo;",
      //  "doubleLow9Reversed" => "&bdquo;foo&ldquo;",
      //  "singleCurled" => "&lsquo;foo&rsquo;",
      //  "singleCurledReversed" => "&rsquo;foo&rsquo;",
      //  "singleLow9" => "&sbquo;foo&rsquo;",
      //  "singleLow9Reversed" => "&sbquo;foo&lsquo;",
      //  "doubleGuillemetsFrench" => "&laquo;&nbsp;foo&nbsp;&raquo;",
      //  "doubleGuillemets" => "&laquo;foo&raquo;",
      //  "doubleGuillemetsReversed" => "&raquo;foo&laquo;",
      //  "singleGuillemets" => "&lsaquo;foo&rsaquo;",
      //  "singleGuillemetsReversed" => "&rsaquo;foo&lsaquo;",
      //  "cornerBrackets" => "&#x300c;foo&#x300d;",
      //  "whiteCornerBracket" => "&#x300e;foo&#x300f;",
      "set_smart_quotes_primary" => Quote_Style::DOUBLE_CURLED,
  
      // Secondary quotemarks style
      // allowed values for $style
      //  "doubleCurled" => "&ldquo;foo&rdquo;",
      //  "doubleCurledReversed" => "&rdquo;foo&rdquo;",
      //  "doubleLow9" => "&bdquo;foo&rdquo;",
      //  "doubleLow9Reversed" => "&bdquo;foo&ldquo;",
      //  "singleCurled" => "&lsquo;foo&rsquo;",
      //  "singleCurledReversed" => "&rsquo;foo&rsquo;",
      //  "singleLow9" => "&sbquo;foo&rsquo;",
      //  "singleLow9Reversed" => "&sbquo;foo&lsquo;",
      //  "doubleGuillemetsFrench" => "&laquo;&nbsp;foo&nbsp;&raquo;",
      //  "doubleGuillemets" => "&laquo;foo&raquo;",
      //  "doubleGuillemetsReversed" => "&raquo;foo&laquo;",
      //  "singleGuillemets" => "&lsaquo;foo&rsaquo;",
      //  "singleGuillemetsReversed" => "&rsaquo;foo&lsaquo;",
      //  "cornerBrackets" => "&#x300c;foo&#x300d;",
      //  "whiteCornerBracket" => "&#x300e;foo&#x300f;",
      "set_smart_quotes_secondary" => Quote_Style::SINGLE_CURLED,
  
      // replaces "a--a" with En Dash " -- " and "---" with Em Dash
      "set_smart_dashes" => true,
  
      // Sets the typographical conventions used by smart_dashes.
      //
      // Allowed values for $style:
      // - "traditionalUS"
      // - "international"
      "set_smart_dashes_style" => Dash_Style::TRADITIONAL_US,
  
      // replaces "..." with "…"
      "set_smart_ellipses" => true,
  
      // replaces "creme brulee" with "crème brûlée"
      "set_smart_diacritics" => true,
  
      // defines hyphenation language for text
      "set_diacritic_language" => "en-US",
  
      // $customReplacements must be
      //      an array formatted array(needle=>replacement, needle=>replacement...), or
      //      a string formatted `"needle"=>"replacement","needle"=>"replacement",...`
      "set_diacritic_custom_replacements" => [
      ],
  
      // replaces (r) (c) (tm) (sm) (p) (R) (C) (TM) (SM) (P) with ® © ™ ℠ ℗
      "set_smart_marks" => true,
  
      // replaces 1*4 with 1x4, etc.
      "set_smart_math" => false,
  
      // replaces 2^4 with 2<sup>4</sup>
      "set_smart_exponents" => true,
  
      // replaces 1/4  with <sup>1</sup>&#8260;<sub>4</sub>
      "set_smart_fractions" => false,
  
      // wrap numbers in <span class="numbers">
      "set_smart_ordinal_suffix" => false,
  
      // single character words are forced to next line with insertion of &nbsp;
      "set_single_character_word_spacing" => true,
  
      // fractions are kept together with insertion of &nbsp;
      "set_fraction_spacing" => true,
  
      // units and values are kept together with insertion of &nbsp;
      "set_unit_spacing" => true,
  
      // Enables/disables extra whitespace before certain punction marks, as is the French custom.
      "set_french_punctuation_spacing" => false,
  
      // a list of units to keep with their values
      "set_units" => [
      ],
  
      // Em and En dashes are wrapped in thin spaces
      "set_dash_spacing" => true,
  
      // Remove extra space characters
      "set_space_collapse" => true,
  
      // Enable usage of true "no-break narrow space" (&#8239;) instead of the normal no-break space (&nbsp;).
      "set_true_no_break_narrow_space" => false,
  
      // enables widow handling
      "set_dewidow" => true,
  
      // establishes maximum length of a widows that will be protected
      "set_max_dewidow_length" => 5,
  
      // establishes the maximum number of words considered for dewidowing.
      "set_dewidow_word_number" => 1,
  
      // establishes maximum length of pulled text to keep widows company
      "set_max_dewidow_pull" => 8,
  
      // enables wrapping at hard hyphens internal to a word with the insertion of a zero-width-space
      "set_wrap_hard_hyphens" => true,
  
      // enables wrapping of urls
      "set_url_wrap" => true,
  
      // enables wrapping of email addresses
      "set_email_wrap" => true,
  
      // establishes minimum character requirement after a url wrapping point
      "set_min_after_url_wrap" => 5,
  
      // wrap ampersands in <span class="amp">
      "set_style_ampersands" => true,
  
      // wrap caps in <span class="caps">
      "set_style_caps" => true,
  
      // wrap initial quotes in <span class="quo"> or <span class="dquo">
      "set_style_initial_quotes" => true,
  
      // wrap numbers in <span class="numbers">
      "set_style_numbers" => true,
  
      // sets tags where initial quotes and guillemets should be styled
      "set_initial_quote_tags" => [
          "p",
          "h1",
          "h2",
          "h3",
          "h4",
          "h5",
          "h6",
          "blockquote",
          "li",
          "dd",
          "dt"
      ],
  
      // enables hyphenation of text
      "set_hyphenation" => false,
  
      // defines hyphenation language for text
      "set_hyphenation_language" => "en-US",
  
      // establishes minimum length of a word that may be hyphenated
      "set_min_length_hyphenation" => 5,
  
      // establishes minimum character requirement before a hyphenation point
      "set_min_before_hyphenation" => 3,
  
      // establishes minimum character requirement after a hyphenation point
      "set_min_after_hyphenation" => 2,
  
      // allows/disallows hyphenation of title/heading text
      "set_hyphenate_headings" => true,
  
      // allows hyphenation of strings of all capital characters
      "set_hyphenate_all_caps" => true,
  
      // allows hyphenation of strings of all capital characters
      "set_hyphenate_title_case" => true,
  
      // defines custom word hyphenations
      // expected input is an array of words with all hyphenation points marked with a hard hyphen
      "set_hyphenation_exceptions" => [
      ],
  
      // Enable lenient parser error handling (HTML is "best guess" if enabled).
      "set_ignore_parser_errors" => true,
  
      // Sets an optional handler for parser errors. Invalid callbacks will be silently ignored
      "set_parser_errors_handler" => null,
  ];
  
  ```
  
  **Tags:** craft3, plugin-typogrify
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-05-17. Score: 2
  
  I don't think the problem is with the Typogrify plugin, but rather with the original source of the text. I have seen something similar before on a site that didn't use the Typogrify plugin.
  
  The problem comes from multi-byte or high-order unicode characters in the original text that has been pasted into the Redactor field in Craft. In the case I dealt with recently, these had come from Word and had not been stripped out by Redactor when the text was pasted in.
  
  Cleaning up the pasted-in text solved the issue for us.
  
  > **Comments:**
  > **username_0**: Thanks, username_1 - I'll try that. We did try copy and pasting into an editor to remove formatting but that didn't seem to work.  
  > **username_1**: The quickest way around it for me was to re-type the text and try to persuade the client not to use Word any more!  
  
  ---
  
  