0 Replies Latest reply on Oct 1, 2015 8:43 AM by erica59044543

    Export to EPUB: Map Special Characters to HTML "Named Entities"?

    erica59044543 Level 1

      I just ran a test to see how InDesign exports these characters:

      SUPERSCRIPT (<sup>). Today is October 1st, 2015.

      EM DASH. Here is an em dash—right here—hope you liked that!

      EN DASH. Here is an en dash – right here – hope you liked that!

      ELLIPSIS. Here is an ellipsis… to convey trailing thought…

      COPYRIGHT. Copyright © Eric 2015.

       

      Here is the exported HTML/EPUB:

      <p class="pBase--p-">SUPERSCRIPT (&lt;sup&gt;). Today is October 1<span class="CharOverride-4">st, 2015.</span></p>
      <p class="pBase--p-"><span class="CharOverride-4">EM DASH. Here is an em dash—right here—hope you liked that!</span></p>
      <p class="pBase--p-"><span class="CharOverride-4">EN DASH. Here is an en dash – right here – hope you liked that!</span></p>
      <p class="pBase--p-"><span class="CharOverride-4">ELLIPSIS. Here is an ellipsis… to convey trailing thought…</span></p>
      <p class="pBase--p-"><span class="CharOverride-4">COPYRIGHT. Copyright © Eric 2015.</span></p>

       

      I note that InDesign:

      a) replaced the required escape characters < and > with &lt; and &gt;

      b) wrapped 'st' in a span tag of class="CharOverride-4", rather than a sup tag. Opening tag in correct location. Closing tag in incorrect location.

      c) wrapped all subsequent text in span tags of class="CharOverride-4".

      d) em dash, en dash, ellipsis, copyright symbol = exported the actual characters rather than HTML named entities.

       

      What is best practice to map these types of special characters for export to EPUB/HTML?

       

      Should they be mapped to named entities so that all devices safely render them as intended?

      em dash = &mdash;

      ellipsis = &hellip;

      left double curly quote = &ldquo;

      etc.

       

      Or are the actual characters exported by InDesign safely rendered as intended on all devices, particularly eReaders?

       

      Also, what's the best mapping technique to handle that unexpected superscript hiccup?

       

      Thank you.