|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Problems with enconding after reading XML files
Hello,
I'm trying to print a XML Report to HTML. Ok, I have used - SimpleXML - PEAR::XML_Parser and both worked perfect. But in both, all characters with accents are printed wrong. Ex: á is printed á ê is printed ê and so on.. And this is a very grave problem to me, because the most part of our words have accents. The strange thing is: if the report has only a few lines, like 50, it prints normal. But the question is that the most part of the reports have more than 40.000 lines and this enconding problem occurs. My XML file is correctly encoded: Code:
<?xml version="1.0" encoding="iso-8859-1" ?> What should I do? I really need this. Any help will be very appreciated. Thanks. Alfred Here is an example of the code I'm using: PHP Code:
|
|
#2
|
|||
|
|||
|
I have solved my problem. I have found the PHP Function utf8_decode and changed line:
PHP Code:
It is necessary to call utf8_decode two times, because it oddly prints 2 encoded characters for each accent. Cya Alfred |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > Problems with enconding after reading XML files |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|