Commit 6307e051f553c1e7b53ba3468a8822c1862ad942
1 parent
f574beae
Exists in
master
and in
7 other branches
Correção na conversão de caracteres para arquivos xml
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
classesphp/classe_menutemas.php
... | ... | @@ -969,7 +969,10 @@ nrss - (opcional) número de registros no rss que serão considerados |
969 | 969 | } |
970 | 970 | function ixml($no,$nome) |
971 | 971 | { |
972 | - return mb_convert_encoding($no->$nome,"HTML-ENTITIES","auto"); | |
972 | + $texto = $no->$nome; | |
973 | + if (!mb_detect_encoding($texto,"UTF-8",true)) | |
974 | + {$texto = mb_convert_encoding($texto,"UTF-8","ISO-8859-1");} | |
975 | + return mb_convert_encoding($texto,"HTML-ENTITIES","auto"); | |
973 | 976 | } |
974 | 977 | |
975 | 978 | } | ... | ... |