UTF-8 characters returned from Search and Promote show garbled characters | Community
Skip to main content
kishore_polsani
Level 4
July 8, 2020
Solved

UTF-8 characters returned from Search and Promote show garbled characters

  • July 8, 2020
  • 2 replies
  • 1257 views

When using Search and Promote integration with AEM, certain UTF-8 characters are returned in results (XML) as garbled characters. Text is visible correctly in Search and Promote data view report with proper UTF-8 encoding.

I have added the charset as UTF-8 in both custom presentation and transport templates. Any idea why the text in XML response is not having proper encoding.

 

TestPresentation.tmpl

<guided-content-type-header content="text/xml; charset=UTF-8" />
<guided-xml-decl charset="UTF-8">

 

TestTransport.tpl

<guided-content-type-header content="text/xml">
<guided-xml-decl charset="1">

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by AlbinIs1

Try adding sp_cs=UTF-8  parameter to the URL e.g  http://stage-xxxxxx.guided.ss-omtrdc.net/sp_staged=1&sp_q=*&sp_cs=UTF-8

 

Regards

Albin I

www.albinsblog.com

2 replies

AlbinIs1Community AdvisorAccepted solution
Community Advisor
July 8, 2020

Try adding sp_cs=UTF-8  parameter to the URL e.g  http://stage-xxxxxx.guided.ss-omtrdc.net/sp_staged=1&sp_q=*&sp_cs=UTF-8

 

Regards

Albin I

www.albinsblog.com

kishore_polsani
Level 4
July 8, 2020
Hi Albin, I have tried it already, but no luck
kishore_polsani
Level 4
July 29, 2020

Any other tags which I can add in transport template to get rid of this charset issue. I tried this snippet in transport template.

 

<guided-content-type-header content="text/xml;charset=UTF-8">
<guided-xml-decl charset="UTF-8">