From 3a7f42e99d414b6f7cd6ab850cbea7d547cfe5d3 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Mon, 7 Jul 2014 13:53:09 +0000 Subject: [PATCH] --- ferramentas/saiku/esquemaxml.php | 4 +++- ferramentas/saiku/saiku-server/tomcat/webapps/ROOT/js/saiku/plugins/CCC_Chart/plugin.js | 15 ++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ferramentas/saiku/esquemaxml.php b/ferramentas/saiku/esquemaxml.php index 53adb6e..22fd284 100644 --- a/ferramentas/saiku/esquemaxml.php +++ b/ferramentas/saiku/esquemaxml.php @@ -121,6 +121,7 @@ $regiao = ""; $item = ""; $registros = ""; //echo "
";var_dump($regioes);exit;
+
 $xml = "";
 //cria as dimensoes de tipo temporal
 if(empty($saikuConfigDataSource['tabelaDimensaoTempo'])){
@@ -410,8 +411,9 @@ header("Location:".$saikuUrl."/?nomeConexao=".$nomeConexao."&locaplic=".$_GET["l
 function converte($texto){
 	$texto = str_replace("&","&",htmlentities($texto));
 	//$texto = htmlentities($texto);
-	//$texto = mb_convert_encoding($texto, 'UTF-8', mb_detect_encoding($texto));
+	//$texto = mb_convert_encoding($texto, 'ISO-8859-1', "auto");
 	//$texto = utf8_encode($texto);
+	//$textox = mb_convert_encoding($texto, "UTF-8", mb_detect_encoding($texto, "UTF-8, ISO-8859-1, ISO-8859-15", true));
 	return $texto;
 }
 ?>
diff --git a/ferramentas/saiku/saiku-server/tomcat/webapps/ROOT/js/saiku/plugins/CCC_Chart/plugin.js b/ferramentas/saiku/saiku-server/tomcat/webapps/ROOT/js/saiku/plugins/CCC_Chart/plugin.js
index da464da..7185e9c 100755
--- a/ferramentas/saiku/saiku-server/tomcat/webapps/ROOT/js/saiku/plugins/CCC_Chart/plugin.js
+++ b/ferramentas/saiku/saiku-server/tomcat/webapps/ROOT/js/saiku/plugins/CCC_Chart/plugin.js
@@ -626,7 +626,7 @@ $(this.el).prepend(" | chart process");
 														this.data.metadata.push({
 																colIndex: 0,
 																colType: "String",
-																colName: firstHeader.join('/')
+																colName: converteHtmlEntities(firstHeader.join('/'))
 														});
 														lowest_level = field - 1;
 												}
@@ -640,7 +640,7 @@ $(this.el).prepend(" | chart process");
 														this.data.metadata.push({
 																colIndex: field - lowest_level + 1,
 																colType: "Numeric",
-																colName: colheader.join('/')
+																colName: converteHtmlEntities(colheader.join('/'))
 														});
 
 														data_start = row+1;
@@ -702,4 +702,13 @@ $(this.el).prepend(" | chart process");
 		}
 });
 
-
+function converteHtmlEntities(texto){
+	var s = ["á","ã","à","é","í","ó","õ","ú","ç","Á","Ã","À","É","Í","Ó","Õ","Ú","Ç"],
+		e = ["á","ã","à","é","í","ó","õ","ú","ç","Á","Ã","À","É","Í","Ó","Õ","Ú","Ç"],
+		n = e.length,
+		i;
+	for(i=0;i