Private Use Area Downmap

Version

Date

Changes

1.0

2009-04-13

Initial version.

Description

Beginning with 2008.4, both the Frame and Word Adapters emit characters from fonts which use the SYMBOL character set (such as Webdings and Wingdings) in the Unicode Private Use Area range F000 - F0FF. This article covers a method for "downmapping" these unicode characters back to their original byte values.

Downmap

To downmap PUA characters, override the mapentrysets.xml file located in Formats/Shared/html. Subtract \uF000 from the unicode value to derive the original byte value. So, PUA character \uF0AC is mapped to \u00AC. Below is a code sample from the attached mapentrysets.xml file.

 <!-- Common HTML character entity names -->
 <!--                                    -->
 <MapEntrySet name="common">
  <MapEntry match="&#160;">&amp;nbsp;</MapEntry>
  <MapEntry match="&#8194;">&amp;nbsp;</MapEntry>
  <MapEntry match="&#8195;">&amp;nbsp;</MapEntry>

  <!-- Downmap Private Use Area characters                                               -->
  <!-- http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Private_use_characters -->
  <!--                                                                                   -->
  ...
  <MapEntry match="&#xF023;">&amp;#x0023;</MapEntry>
  <MapEntry match="&#xF024;">&amp;#x0024;</MapEntry>
  <MapEntry match="&#xF025;">&amp;#x0025;</MapEntry>
  <MapEntry match="&#xF026;">&amp;#x0026;</MapEntry>
  <MapEntry match="&#xF027;">&amp;#x0027;</MapEntry>
  <MapEntry match="&#xF028;">&amp;#x0028;</MapEntry>
  <MapEntry match="&#xF029;">&amp;#x0029;</MapEntry>
  <MapEntry match="&#xF02A;">&amp;#x002A;</MapEntry>
  <MapEntry match="&#xF02B;">&amp;#x002B;</MapEntry>
  <MapEntry match="&#xF02C;">&amp;#x002C;</MapEntry>
  <MapEntry match="&#xF02D;">&amp;#x002D;</MapEntry>
  <MapEntry match="&#xF02E;">&amp;#x002E;</MapEntry>
  <MapEntry match="&#xF02F;">&amp;#x002F;</MapEntry>
  ...
 </MapEntrySet>
</MapEntrySets>

Using Downmap

Download the attached mapentrysets.xml and create an override in your Design (Pro) project.

Utility

The attached mapentrysets.xml was creating using a Python script (downmap_pua.py) to generate the appropriate downmapping entries.

DevCenter/Projects/HTML/PrivateUseAreaDownmap (last edited 2009-05-18 20:02:58 by BenAllums)