0

I always seen in phpmyadmin special characters encoded like:
میثم Ø§Ø¨Ø±Ø§Ù‡ÛŒÙ…ÛŒØ¬ØØ¹Ø´Ù‚ ØŒ سر ب راه ØŒ نبض ØŒ شبهای ØŒ غنچه ها ØŒ شکوه ØŒ همین امروز ØŒ عادت ت'

I always thought that was just a problem related to phpmyadmin since on my application all of them were displayed correctly. Now I'm exporting this database and in my mysql dump I see exactly the characters above so seems that they are stored in this way on the database.

There is an easy way to dump the utf8 characters?

I already tried to follow those suggestion: I need help fixing Broken UTF8 encoding

but the only thing that let visualize the characters properly is print them on a web page and add on top:

<html>      
    <head>
        <meta charset="UTF-8">
    </head>         
<body>

The collation of the fields is utf8_unicode_ci. The connection exploit:

$options = array(\PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',);

Edit: @Álvaro-González Attemp to retrieve hexadecimal values

I enter in the database the symbol then from phpmyadmin I select with: SELECT name, HEX(name) as hex_name FROM `items` that's the result:

name €
hex_name C3A2E2809AC2AC

I will provide any further information on request Thanks

Community
  • 1
  • 1
user3396065
  • 549
  • 5
  • 15

1 Answers1

0

You wanted ? But the hex is C3A2E2809AC2AC. That is a case of "double encoding" - when you stored the data.

See Trouble with utf8 characters; what I see is not what I stored , especially in the discussion about "double encoding".

The data is broken. You may be able to fix the data with a messy UPDATE. See http://mysql.rjweb.org/doc.php/charcoll#example_of_double_encoding .

Edit

Your original stuff looks like

CONVERT(BINARY(CONVERT('میثم اب' USING latin1)) USING utf8mb4)میثم اب   -- mojibake to ut8,
Community
  • 1
  • 1
Rick James
  • 135,179
  • 13
  • 127
  • 222