Commit 3a7f42e99d414b6f7cd6ab850cbea7d547cfe5d3

Authored by Edmar Moretti
1 parent 82af21ac

--no commit message

ferramentas/saiku/esquemaxml.php
... ... @@ -121,6 +121,7 @@ $regiao = "";
121 121 $item = "";
122 122 $registros = "";
123 123 //echo "<pre>";var_dump($regioes);exit;
  124 +
124 125 $xml = "<Schema name='i3Geo Metaestat'>";
125 126 //cria as dimensoes de tipo temporal
126 127 if(empty($saikuConfigDataSource['tabelaDimensaoTempo'])){
... ... @@ -410,8 +411,9 @@ header(&quot;Location:&quot;.$saikuUrl.&quot;/?nomeConexao=&quot;.$nomeConexao.&quot;&amp;locaplic=&quot;.$_GET[&quot;l
410 411 function converte($texto){
411 412 $texto = str_replace("&","&amp;",htmlentities($texto));
412 413 //$texto = htmlentities($texto);
413   - //$texto = mb_convert_encoding($texto, 'UTF-8', mb_detect_encoding($texto));
  414 + //$texto = mb_convert_encoding($texto, 'ISO-8859-1', "auto");
414 415 //$texto = utf8_encode($texto);
  416 + //$textox = mb_convert_encoding($texto, "UTF-8", mb_detect_encoding($texto, "UTF-8, ISO-8859-1, ISO-8859-15", true));
415 417 return $texto;
416 418 }
417 419 ?>
... ...
ferramentas/saiku/saiku-server/tomcat/webapps/ROOT/js/saiku/plugins/CCC_Chart/plugin.js
... ... @@ -626,7 +626,7 @@ $(this.el).prepend(&quot; | chart process&quot;);
626 626 this.data.metadata.push({
627 627 colIndex: 0,
628 628 colType: "String",
629   - colName: firstHeader.join('/')
  629 + colName: converteHtmlEntities(firstHeader.join('/'))
630 630 });
631 631 lowest_level = field - 1;
632 632 }
... ... @@ -640,7 +640,7 @@ $(this.el).prepend(&quot; | chart process&quot;);
640 640 this.data.metadata.push({
641 641 colIndex: field - lowest_level + 1,
642 642 colType: "Numeric",
643   - colName: colheader.join('/')
  643 + colName: converteHtmlEntities(colheader.join('/'))
644 644 });
645 645  
646 646 data_start = row+1;
... ... @@ -702,4 +702,13 @@ $(this.el).prepend(&quot; | chart process&quot;);
702 702 }
703 703 });
704 704  
705   -
  705 +function converteHtmlEntities(texto){
  706 + var s = ["á","ã","à","é","í","ó","õ","ú","ç","Á","Ã","À","É","Í","Ó","Õ","Ú","Ç"],
  707 + e = ["&aacute;","&atilde;","&agrave;","&eacute;","&iacute;","&oacute;","&otilde;","&uacute;","&ccedil;","&Aacute;","&Atilde;","&Agrave;","&Eacute;","&Iacute;","&Oacute;","&Otilde;","&Uacute;","&Ccedil;"],
  708 + n = e.length,
  709 + i;
  710 + for(i=0;i<n;i++){
  711 + texto = texto.replace(e[i],s[i]);
  712 + }
  713 + return texto;
  714 +}
... ...