1.

Why Does The Datapower Appliance Convert My Utf-8 Characters To Encoding?

Answer»

A back end server or the requesting client might be expecting some special characters such as the British Pound symbol and letters with umlauts, accents, or other special marks; however, these special characters are not preserved when they pass through the DataPower appliance.

Take the following steps to resolve the problem:

  • Set include charset in response-type to on:
  • For the Multi-Protocol Gateway service or the Web Service PROXY service:
  • Use the Objects navigator to open the service configuration screen.
  • Choose the Proxy Settings tab and set include charset in response-type to on.
  • For the XML FIREWALL service:
  • Use the Objects navigator to open the XML Firewall service configuration screen.
  • Choose the HTTP Options tab and set HTTP charset in response-type to on.
  • Edit the XML Manager that you are using in your service so that the XML Manager contains a minimum output escaping rule:
  • Add a new Compile Options Policy or select an existing ONE by clicking ....
  • Add a Minimum Output Escaping Rule.
  • Add a MATCHING rule so that all requests coming in on that URI (it can be * ) are minimally ESCAPED.
  • Use a style sheet in the transform action in your processing rule. Include the following line in the style sheet to specify output encoding:

<xsl:output encoding="UTF-8" version="1.0" method="xml"/>

  • Make sure that you transform the incoming request with your style sheet, even minimally; otherwise, the settings in step 2 are not used. If you do not want to transform the request, insert the following line in between the xsl:template element tags:

<a>
<xsl:copy-of select="."/>
</a>

Optional: If your response still escapes the special characters, clear the stylesheet cache. Clearing the style sheet cache ensures that the DataPower appliance uses the current settings.

A back end server or the requesting client might be expecting some special characters such as the British Pound symbol and letters with umlauts, accents, or other special marks; however, these special characters are not preserved when they pass through the DataPower appliance.

Take the following steps to resolve the problem:

<xsl:output encoding="UTF-8" version="1.0" method="xml"/>

<a>
<xsl:copy-of select="."/>
</a>

Optional: If your response still escapes the special characters, clear the stylesheet cache. Clearing the style sheet cache ensures that the DataPower appliance uses the current settings.



Discussion

No Comment Found