To force a mapping different from the DITA2Go mapping of a particular character, or to map any arbitrary Unicode character (for example):
[CharConvert] ; Unicode char num = HTML numeric value or string replacement ; nonbreaking hyphen is decimal 8209, becomes entity – 8209 = 150 ; em space is x2003, becomes three nonbreaking spaces x2003 =
To the left of the equals sign, specify any of the following for the character you want to replace:
Table 30-1 shows the Unicode or other hexadecimal (and in some cases, decimal) value you can specify to the left of the equals sign.
To the right of the equals sign, specify any of the following:
When you supply a string rather than a character code, DITA2Go expands any macros referenced, but includes the rest of the string in the output as is. Therefore you must escape any literal characters such as < by providing an entity reference instead; in this case, <.
To map the bullet to a middle dot:
[CharConvert] 149 = 183
To map the bullet to a bold middle dot:
[CharConvert] 149 = <b>·</b>
To map the bullet to an image:
[CharConvert] 149 = <img src="mybullet.gif">
To map the ohm symbol from Unicode to the Symbol font for HTML Help:
[CharConvert] U+2126 = <span class="Symbol">W</span>
and add the class to your CSS:
[CSSEndMacro] .Symbol {font-family: Symbol; }
In code-page encoding, as for HTML Help output, the only valid solution for handling out-of-range characters is to use a font that has the desired glyph within the code page. In this case, the glyph for ohm is in Symbol, which will work in all single-byte code pages (but not in Asian code pages, where an Asian symbol font is needed instead).
Use only to map non-printable characters
Although you can specify any decimal integer to the left of the equals sign, this mapping option is intended only for characters that are not in the regular printable set. Using [CharConvert] to map a character in the printable set can result in surprises. You can try mapping other integers, but the odds are poor for values not in the range 128 through 255. There are a few exceptions. For example, DITA2Go automatically converts a solidus to a forward slash, which is in the printable set. You can prevent this conversion by mapping the solidus to itself, specifying the Unicode value to the left of the equals sign and again on the right, as a numeric entity reference:
[CharConvert] 8260 = ⁄