MYSQL conversion coding solution 1. Obtain the hexadecimal encoding mysql> SELECT hex (CONVERT ('tourists' USING gbk) under gbk of the Chinese 'tourists' in mysql of utf8 )); -> D3CEBFCD www.2cto.com reversed gbk hexadecimal encoding and retrieved Chinese mysql> select convert (unhex ('d3cebfcd') USING gbk ); -> 'tourists' hexadecimal encoding is directly converted from gbk's hexadecimal encoding to utf8's hexadecimal encoding mysql> select hex (CONVERT (unhex ('d3cebfcd') USING gbk) USING utf8 )); -> 'e6b8b8e5aea2 '2. If www.2cto.com obtains the hexadecimal mysql encoding for gbk of the Chinese 'tourists' in gbk, SELECT hex ('tourists '); -> D3 CEBFCD reversed the gbk hexadecimal encoding and retrieved the Chinese mysql> unhex ('d3cebfcd');-> the principle of 'tourists' is known, you can write a small program to replace the code. Note that 0x must be added to the header in hexadecimal text, for example, 0xD3CEBFCD.