Looking for the v10 manual? Visit our new user's guide!
 
Search Descriptions Version
 
 
This article applies to: ML v7, ML8, MultiStore

Unable to translate unicode character


Symptoms
When attempting to send receipts or distributor emails, or attempting to view a page that uses XML packages, the site throws an error similar to:

     XmlPackage Exception: Exception=Last Trace Point=[].
     Unable to translate Unicode character \u2013 at index
     134 to specified code page.
     System.ArgumentException: Last Trace Point=[]. Unable
     to translate Unicode character \u2013 at index 134 to
     specified code page. at
     AspDotNetStorefrontCommon.XmlPackage2.TransformString()

Cause
This is caused by having upper Unicode characters in the data being displayed by the receipt or email XML package.  The issue occurs because in order to have compatibility with the broadest range of mail clients, our email XML packages utilize ISO-8859-1 output encoding.  This encoding cannot handle upper unicode characters, which includes a range of special characters and languages.

This usually occurs when copying information directly from other sources into ASPDNSF.  For example, certain web pages or word processors may use upper Unicode characters.  Copying directly from these sources inserts those characters into your ASPDNSF tables.

Solution
There are two solutions to this issue:

1 - Remove the offending characters from your data.  If your data contain special characters copied from word processor documents or other web pages, you can remove these symbols or possibly replace them with valid ASCII characters.  This is typically only feasible if you have a small number of affected entities.

2 - Change the XML Package output encoding.
     - Open the notification.*.xml.config file (or other affected XML file) from your site's XmlPackages folder
     - Locate the following element...

<xsl:output method="html" omit-xml-declaration="yes" encoding="ISO-8859-1" />

     - and change it to:

<xsl:output method="html" omit-xml-declaration="yes" encoding="UTF-16" />