∞ converts to âž when pasted into a MySQL table

The infinity character ( ) is converted to ∞when it is inserted into my MySQL table using a PHP script, but if I insert it directly from phpMyAdmin, it inserts correctly. The character is passed to the PHP script by calling GET with a JavaScript function encodeURIComponent()around the content. Field in MySQL database utf8_swedish_cl. How do I get to insert as quality into the database?

+3
source share
4 answers

Mark this real good SO: UTF-8 answer all the way ...

+2
source

, phpMyAdmin ? ∞ UTF8, 1- .

, select hex(column_name) from the_table?

  • E2889E, UTF8, .

  • C3AC, -1, - utf8.

  • EC, , -1

, - UTF8:

select 
    column_name, character_set_name, collation_name 
from 
    information_schema.columns
where
    table_name = '_your table_'
+1

SET NAMES utf8 , ?

0

"" SET CHARACTER SET utf8 .

0

Source: https://habr.com/ru/post/1728544/


All Articles