<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Encoding problem in FTL template in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/encoding-problem-in-ftl-template/m-p/279799#M232929</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi folks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm struggling with an encoding issue in my FTL template. The letters are not encoded with UTF-8 but they should. Maybe someone can help me with this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Via webscript I fetch some data from the database and return a JSON. The JSON already contains the data with the different encoding (for example: windows-1252). Now I want to display the values from the JSON in my FTL template in a table. The result is shown in "image_1.jpg". But if I open the affected document with the Alfresco standard Web-GUI the name will be displayed as expected (see attached "image_2.jpg"). &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know how I can prepare my FTL template that the data will be displayed correctly as in the Web-GUI too. This proves me that there is a chance to get it displayed with the correct encoding. So, what is still missing?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried already to specify the following statements on the beginning of my template:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;#ftl encoding='UTF-8'&amp;gt;&lt;BR /&gt;&amp;lt;head&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta http-equiv="content-type" content="text/html; charset=utf-8"/&amp;gt;&lt;BR /&gt;&amp;lt;/head&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;But it seems that it has no effect. To display the value, there is nothing special implemented. I only read the parameter from the JSON map and put it in a usual HTML table tag. Nothing fancy:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;…&lt;BR /&gt; &amp;lt;td&amp;gt;${d["name"]}&amp;lt;/td&amp;gt;&lt;BR /&gt;…&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone still has an idea? Do I miss somehting that should be imported in my FTL? The only imports I have in my ".get.head.ftl" are:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;#include "/org/alfresco/components/component.head.inc"&amp;gt;&lt;BR /&gt;&amp;lt;@script type="text/javascript" src="${page.url.context}/res/components/console/consoletool.js"&amp;gt;&amp;lt;/@script&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Jun 2014 13:33:56 GMT</pubDate>
    <dc:creator>itzamna</dc:creator>
    <dc:date>2014-06-25T13:33:56Z</dc:date>
    <item>
      <title>Encoding problem in FTL template</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/encoding-problem-in-ftl-template/m-p/279799#M232929</link>
      <description>Hi folks,I'm struggling with an encoding issue in my FTL template. The letters are not encoded with UTF-8 but they should. Maybe someone can help me with this?Via webscript I fetch some data from the database and return a JSON. The JSON already contains the data with the different encoding (for exam</description>
      <pubDate>Wed, 25 Jun 2014 13:33:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/encoding-problem-in-ftl-template/m-p/279799#M232929</guid>
      <dc:creator>itzamna</dc:creator>
      <dc:date>2014-06-25T13:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: Encoding problem in FTL template</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/encoding-problem-in-ftl-template/m-p/279800#M232930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you try putting below in your ftl and see if it works for you or not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;#escape x as jsonUtils.encodeJSONString(x)&amp;gt;&lt;BR /&gt;Your content of ftl file&lt;BR /&gt;&amp;lt;/#escape&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jun 2014 08:08:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/encoding-problem-in-ftl-template/m-p/279800#M232930</guid>
      <dc:creator>romschn</dc:creator>
      <dc:date>2014-06-27T08:08:15Z</dc:date>
    </item>
  </channel>
</rss>

