Commit 5fb3036f02a2c27c7ed7a859171bc14fd7013fe5
1 parent
2347e967
Exists in
master
and in
7 other branches
Correção na função de conversão de caracteres. A conversão será feita conforme a…
… variável $convUTF definida em admin/php/conexao.php ou no arquivo de conexão definido pelo usuário.
Showing
1 changed file
with
7 additions
and
1 deletions
Show diff stats
admin/php/classe_arvore.php
| ... | ... | @@ -20,6 +20,9 @@ class Arvore |
| 20 | 20 | $dbh = ""; |
| 21 | 21 | error_reporting(E_ALL); |
| 22 | 22 | include($locaplic."/admin/php/conexao.php"); |
| 23 | + if(!isset($convUTF)) | |
| 24 | + {$convUTF = true;} | |
| 25 | + $this->convUTF = $convUTF; | |
| 23 | 26 | $this->dbh = $dbh; |
| 24 | 27 | // |
| 25 | 28 | //verifica se o ip atual está cadastrado como um dos editores |
| ... | ... | @@ -320,7 +323,10 @@ class Arvore |
| 320 | 323 | return $str; |
| 321 | 324 | } |
| 322 | 325 | function converte($texto){ |
| 323 | - $texto = mb_convert_encoding($texto,mb_detect_encoding($texto),"UTF-8"); | |
| 326 | + if($this->convUTF == true) | |
| 327 | + $texto = mb_convert_encoding($texto,mb_detect_encoding($texto),"UTF8"); | |
| 328 | + else | |
| 329 | + $texto = mb_convert_encoding($texto,mb_detect_encoding($texto),"ISO-8859-1"); | |
| 324 | 330 | return $texto; |
| 325 | 331 | } |
| 326 | 332 | } | ... | ... |