<?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 Convert entities HTML to text in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Convert-entities-HTML-to-text/m-p/2366996#M130419</link>
    <description>Hi,
&lt;BR /&gt;Is there a component or a function to convert entities HTML to text ?
&lt;BR /&gt;(I use the Entreprise Edition in Java)
&lt;BR /&gt;
&lt;BR /&gt;Thank you,
&lt;BR /&gt;Carole</description>
    <pubDate>Thu, 29 Mar 2012 14:27:55 GMT</pubDate>
    <dc:creator>param75</dc:creator>
    <dc:date>2012-03-29T14:27:55Z</dc:date>
    <item>
      <title>Convert entities HTML to text</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-entities-HTML-to-text/m-p/2366996#M130419</link>
      <description>Hi,
&lt;BR /&gt;Is there a component or a function to convert entities HTML to text ?
&lt;BR /&gt;(I use the Entreprise Edition in Java)
&lt;BR /&gt;
&lt;BR /&gt;Thank you,
&lt;BR /&gt;Carole</description>
      <pubDate>Thu, 29 Mar 2012 14:27:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-entities-HTML-to-text/m-p/2366996#M130419</guid>
      <dc:creator>param75</dc:creator>
      <dc:date>2012-03-29T14:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: Convert entities HTML to text</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-entities-HTML-to-text/m-p/2366997#M130420</link>
      <description>Hi Carole&lt;BR /&gt;This topic 22254 will help you.&lt;BR /&gt;Regards,&lt;BR /&gt;Pedro</description>
      <pubDate>Fri, 30 Mar 2012 03:23:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-entities-HTML-to-text/m-p/2366997#M130420</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-30T03:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: Convert entities HTML to text</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-entities-HTML-to-text/m-p/2366998#M130421</link>
      <description>Hi,
&lt;BR /&gt;Finally, I used a new routine with the following code : 
&lt;BR /&gt;
&lt;BR /&gt;
&lt;PRE&gt;package routines;&lt;BR /&gt;import java.util.*;&lt;BR /&gt;public class StringUtils {&lt;BR /&gt;	&lt;BR /&gt;	 private StringUtils() {}&lt;BR /&gt;	 &lt;BR /&gt;	 private static HashMap&amp;lt;String,String&amp;gt; htmlEntities;&lt;BR /&gt;	  static {&lt;BR /&gt;	    htmlEntities = new HashMap&amp;lt;String,String&amp;gt;();&lt;BR /&gt;	    htmlEntities.put("&amp;lt;","&amp;lt;");	    	htmlEntities.put("&amp;gt;","&amp;gt;"); &lt;BR /&gt;	    htmlEntities.put("&amp;amp;","&amp;amp;");			htmlEntities.put(""","\""); &lt;BR /&gt;	    htmlEntities.put("à","à"); 		htmlEntities.put("À","À"); &lt;BR /&gt;	    htmlEntities.put("Á", "Á");		htmlEntities.put("á", "á");&lt;BR /&gt;	    htmlEntities.put("â","â") ; 		htmlEntities.put("Ã", "Ã");&lt;BR /&gt;	    htmlEntities.put("ã", "ã");		htmlEntities.put("ä","ä"); &lt;BR /&gt;	    htmlEntities.put("Ä","Ä")  ; 		htmlEntities.put("Â","Â"); &lt;BR /&gt;	    htmlEntities.put("å","å") ; 		htmlEntities.put("Å","Å"); &lt;BR /&gt;	    htmlEntities.put("æ","æ") ; 		htmlEntities.put("Æ","Æ" ); &lt;BR /&gt;	    htmlEntities.put("ý", "ý");		htmlEntities.put("ÿ", "ÿ");&lt;BR /&gt;	    htmlEntities.put("ç","ç"); 		htmlEntities.put("Ç","Ç"); &lt;BR /&gt;	    htmlEntities.put("é","é"); 		htmlEntities.put("É","É" ); &lt;BR /&gt;	    htmlEntities.put("è","è"); 		htmlEntities.put("È","È"); &lt;BR /&gt;	    htmlEntities.put("ê","ê") ; 		htmlEntities.put("Ê","Ê"); &lt;BR /&gt;	    htmlEntities.put("ë","ë")  ; 		htmlEntities.put("Ë","Ë"); &lt;BR /&gt;	    htmlEntities.put("Í", "Í");		htmlEntities.put("í", "í");&lt;BR /&gt;	    htmlEntities.put("Î", "Î");		htmlEntities.put("î","î");&lt;BR /&gt;	    htmlEntities.put("Ì", "Ì");		htmlEntities.put("ì", "ì");&lt;BR /&gt;	    htmlEntities.put("ï","ï")  ; 		htmlEntities.put("Ï","Ï"); &lt;BR /&gt;	    htmlEntities.put("ó","ó");		htmlEntities.put("ô","ô") ; &lt;BR /&gt;	    htmlEntities.put("Ô","Ô"); 		htmlEntities.put("Ó", "Ó");&lt;BR /&gt;	    htmlEntities.put("Ò", "Ò");		htmlEntities.put("ò", "ò");&lt;BR /&gt;	    htmlEntities.put("Õ", "Õ");		htmlEntities.put("õ", "õ");&lt;BR /&gt;	    htmlEntities.put("ö","ö")  ; 		htmlEntities.put("Ö","Ö"); &lt;BR /&gt;	    htmlEntities.put("Ñ","Ñ") ;		htmlEntities.put("ø","ø") ; &lt;BR /&gt;	    htmlEntities.put("Ø","Ø"); 		htmlEntities.put("Ð","Ð") ;&lt;BR /&gt;	    htmlEntities.put("ð","ð") ;			htmlEntities.put("Þ","Þ") ; &lt;BR /&gt;	    htmlEntities.put("þ","þ") ; 		htmlEntities.put("ß","ß") ;&lt;BR /&gt;	    htmlEntities.put("Ú", "Ú") ;		htmlEntities.put("ú", "ú") ;&lt;BR /&gt;	    htmlEntities.put("ù","ù"); 		htmlEntities.put("Ù","Ù"); &lt;BR /&gt;	    htmlEntities.put("û","û"); 		htmlEntities.put("Û","Û") ; &lt;BR /&gt;	    htmlEntities.put("ü","ü"); 		htmlEntities.put("Ü","Ü")  ; &lt;BR /&gt;	    htmlEntities.put("&amp;nbsp;"," "); &lt;BR /&gt;	    htmlEntities.put("©","\u00a9"); &lt;BR /&gt;	    htmlEntities.put("®","\u00ae"); &lt;BR /&gt;	    htmlEntities.put("€","\u20a0");&lt;BR /&gt;	  }&lt;BR /&gt;	 &lt;BR /&gt;		 /**&lt;BR /&gt;	     * unescapeHTML: remplacer les entitees HTML par leur caractère &lt;BR /&gt;	     * &lt;BR /&gt;	     *&lt;BR /&gt;	     * {talendTypes} String&lt;BR /&gt;	     * &lt;BR /&gt;	     * {Category} User Defined&lt;BR /&gt;	     * &lt;BR /&gt;	     * {param} String("champ") input: champ à traiter&lt;BR /&gt;	     * &lt;BR /&gt;	     * {example} unescapeHTML("champ") # "text du champ après traitement".&lt;BR /&gt;	     */&lt;BR /&gt;	  public static final String unescapeHTML(String source) {&lt;BR /&gt;	      int i, j;&lt;BR /&gt;	      boolean continueLoop;&lt;BR /&gt;	      int skip = 0;&lt;BR /&gt;	      do {&lt;BR /&gt;	         continueLoop = false;&lt;BR /&gt;	         i = source.indexOf("&amp;amp;", skip);&lt;BR /&gt;	         if (i &amp;gt; -1) {&lt;BR /&gt;	           j = source.indexOf(";", i);&lt;BR /&gt;	           if (j &amp;gt; i) {&lt;BR /&gt;	             String entityToLookFor = source.substring(i, j + 1);&lt;BR /&gt;	             String value = (String) htmlEntities.get(entityToLookFor);&lt;BR /&gt;	             if (value != null) {&lt;BR /&gt;	               source = source.substring(0, i)&lt;BR /&gt;	                        + value + source.substring(j + 1);&lt;BR /&gt;	               continueLoop = true;&lt;BR /&gt;	             }&lt;BR /&gt;	             else if (value == null){&lt;BR /&gt;	                skip = i+1;&lt;BR /&gt;	                continueLoop = true;&lt;BR /&gt;	             }&lt;BR /&gt;	           }&lt;BR /&gt;	         }&lt;BR /&gt;	      } while (continueLoop);&lt;BR /&gt;	      return source;&lt;BR /&gt;	  }&lt;BR /&gt;}&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Apr 2012 13:53:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-entities-HTML-to-text/m-p/2366998#M130421</guid>
      <dc:creator>param75</dc:creator>
      <dc:date>2012-04-02T13:53:19Z</dc:date>
    </item>
  </channel>
</rss>

