Why Do Translators Encounter Problems with Special Characters?

Some translation systems can handle double-escaped special characters, such as &, by displaying them as & or &. However, some translation systems cannot handle double-escaped special characters, such as &.

There are several ways to handle this.

Recommendation 1 – Same as Source option

If your translator’s translation system supports the “Same as Source” option, then instruct your translator to select this option. This converts and returns all special characters–actual characters, escaped characters, and double-escaped characters–as they were received.

However, this feature is not supported by all translation systems or they may not be able to change this setting. In those scenarios, or if you see a combination of single- and double-escaped characters, consider one of the following recommendations.

Recommendation 2 – All single encoded

Your translator should handle each type of special character consistently. For example, in the target XML:

  • Your translator can return the following special characters as single escaped:
  • <
  • >
  • &
  • Your translator can return the following special characters as the actual characters:
  • '
  • "
Recommendation 3 – Use CData tags

Selecting the Add CData to Output check box instructs the Connector to wrap content in CData tags, which prevents the Connector from escaping special characters, and avoids the scenario of double-escaped characters. However, this setting does not prevent Sitecore from single-escaping special characters in rich text.

Note: The Connector adds and removes the CData tags, so they are not displayed within Sitecore’s Content Editor.

Important: If you change this setting, your translators must return the translated content in CData tags, just as they received the source content in CData tags. They should not run any post-translation scripts to escape the special characters before returning the content.

Warning: If you change this setting in the middle of a translation job, it can interfere with the integrity of the translation memory.

For detailed instructions on selecting the Add CData to Output check box, see Adding CData Tags to Translation Files.