Answer the question
In order to leave comments, you need to log in
Russian letter X and utf-8?
Good evening!
I am parsing news from the old version of the site to the new one. The old site is in UTF-8, the new one will also be in UTF-8.
Faced with the problem that instead of the Russian letter X, an incomprehensible symbol is shown. Accordingly, when writing to a new table, everything that was in the name after the letter X is cut off.
When trying to convert a string from utf8 to windows-1251 and back, at the first stage I get the error iconv(): Detected an illegal character in input string
This is how it turns out when parsing:
---------
Representatives of commercial organizations provided assistance. ......
---------
the parser is made in PHP and is run from the console
Answer the question
In order to leave comments, you need to log in
When parsing for the first time, put the u modifier on the type regular expression like this:('/текст/ismu', $res)
1. I don’t see the point of transcoding something, you have both sites in UTF-8.
2. I also don’t see the point in the parser. What, the customer did not give you access to the database, or at least a dump?
3. Figure out what you really have for the symbol (its code).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question