\ x447 \ x435 \ x440 \ x43d \ x438 \ x433 \ x43e \ x432

    2 answers 2

    This is a string written in utf-8. Coded word - "Chernigov".

    as it is encoded: \ x - means that the next number will be written in hexadecimal notation. Since there are three characters, there are two bytes. That is, 04 47 04 35 04 40 04 3d 04 38 04 33 04 3e 04 32 .

    How to decode in php for beautiful - I do not know. But he came up with this - first replace \ x with a percent sign and apply urlencode.

    it shows how to code this way.

    • 2
      Found a solution: html_entity_decode (preg_replace ('~ \\\ x ([a-f0-9] +) ~ i', '& # x $ 1;', $ string), 0, 'UTF-8') thank you for the hint ! more in detail: 1) we turn it into html-sequences: \ xCOD-> & # xCOD; 2) decode the string html_entity_decode - kanaris

    Do not grieve Mama do not worry ...

    \ x447 \ x435 \ x440 \ x43d \ x438 \ x433 \ x43e \ x432

    ASCII encoding, let's fight with JS to understand what's the matter)

     alert('\x447\x435\x440\x43d\x438\x433\x43e\x432');//Результат - D7C5D0CdC8C3CeC2 

    Go ahead, substitute the same ASCII architecture for the result.

     alert('\xD7\xC5\xD0\xCd\xC8\xC3\xCe\xC2');//Результат - ×ÅÐÍÈÃΠ

    О_о

    We go to A. Lebedev and use the tool and transform it into a result in Chernihiv

    ZY I am now wondering why so pervert in simple words? ..

    • This is most likely taken from a site on which city names (?) are stored in this form ... I have met more than once, so this is not fun;) and the question is relevant, how to decode it on the fly on php - thunder
    • one
      @thunder I don’t say that the TC was having fun) I didn’t mention the irrelevance of the question! - Palmervan