S
S
Snewer2016-05-18 16:38:32
PHP
Snewer, 2016-05-18 16:38:32

What is the problem with outputting xml file?

Hello!
PHP script generates some XML file. Google Chorme throws an error:

This page contains the following errors:

error on line 18 at column 1577: Input is not proper UTF-8, indicate encoding !
Bytes: 0xD0 0xB4 0xD0 0xBE

Everything is in UTF-8. There are no incorrectly displayed characters. Works in IE. iconv doesn't help. What could be the problem? In addition, when saving the file to disk and then opening it, there is no error.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Michael, 2016-05-23
@springimport

In my experience, I would make a similar script with a predetermined file. Most likely the file itself is correct, but the character on this line is not.

N
Nog, 2021-03-10
@Nog

Is there any element content clipping? There was such a mistake. Because substr cut off and left an incomplete utf-8 character at the end. As soon as I changed it to mb_substr(... 'UTF-8') - everything worked like clockwork

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question