Commit 822621db25d177fc540d4f4a618030a490284483
1 parent
9e10ed8a
Exists in
master
and in
7 other branches
Correção na acentuação
Showing
1 changed file
with
9 additions
and
5 deletions
Show diff stats
admin/hiperbolica.php
... | ... | @@ -3,11 +3,14 @@ error_reporting(0); |
3 | 3 | include("../ms_configura.php"); |
4 | 4 | include("$locaplic/admin/php/admin.php"); |
5 | 5 | include("$locaplic/admin/php/conexao.php"); |
6 | +$encoding = "UTF-8"; | |
6 | 7 | if($convUTF) |
7 | 8 | $xml = "<"."\x3F"."xml version='1.0' encoding='UTF-8' "."\x3F".">"; |
8 | -else$xml = "<"."\x3F"."xml version='1.0' encoding='ISO-8859-1' "."\x3F".">"; | |
9 | - | |
10 | - | |
9 | +else | |
10 | +{ | |
11 | + $xml = "<"."\x3F"."xml version='1.0' encoding='ISO-8859-1' "."\x3F".">"; | |
12 | + $encoding = "ISO-8859-1"; | |
13 | +} | |
11 | 14 | $xml .= "<capa>"; |
12 | 15 | $menus = pegaDados("SELECT * from i3geoadmin_menus order by nome_menu ",$locaplic); |
13 | 16 | $xml .= '<termo cor="#FFFFFF" id="00" nome="Dados geo">'; |
... | ... | @@ -141,8 +144,9 @@ echo $xml; |
141 | 144 | |
142 | 145 | function h_converteTexto($i) |
143 | 146 | { |
144 | - $encoding = mb_detect_encoding($i, 'UTF-8, UTF-7, ASCII, ISO-8859-1'); | |
145 | - return mb_convert_encoding($i,"UTF-8",$encoding); | |
147 | + global $encoding; | |
148 | + $s = mb_detect_encoding($i, 'UTF-8, UTF-7, ASCII, ISO-8859-1'); | |
149 | + return mb_convert_encoding($i,$encoding,$s); | |
146 | 150 | } |
147 | 151 | |
148 | 152 | ?> | ... | ... |