P
P
Paka2017-10-31 13:30:38
PHP
Paka, 2017-10-31 13:30:38

How to apply iconv correctly?

I have text from db

23 ð Ð Ð Ð Ð Ð Ð Ð Ð Ð Ð Ð Ð Ð Ð Ð Ð Ð Ð Ð Ð Ð Ð Ð Ð Ð Ð Ð € РРРРРРРРРРРРРРРРРРРум.

The https://2cyr.com/decode/?lang=ru service will wonderfully decode this string into Russian.
But when I write, I getecho iconv('windows-1252', 'utf-8', $txt)
Notice: iconv(): Detected an illegal character in input string in

what am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Taratin, 2017-10-31
@Taraflex

$text = '23 ноÑÐ±Ñ€Ñ 2017 года в МоÑкве ÑоÑтоитÑÑ V МоÑковÑкий международный инженерный форум.';
 echo iconv('UTF-8//IGNORE', 'cp1252//IGNORE', $text);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question