I got some varbinary(24) data in my mysql row, and I want to convert it into normal text and vice versa , the important thing is that varbinary contains special (Polish ąśżćęł) characters, and they can not be lost during convering the data.
How it can be done?
Varbinary example field example:
bfebb1e2c0c720b8c1c5e420202020202020202020202020
Usually this can be done using CONVERT when you know the original chartset:
mysql> SELECT
-> CONVERT(x'ece0ece020ecfbebe020f0e0ecf320202020202020202020'
-> USING cp1251) as s;
+--------------------------------------+
| s |
+--------------------------------------+
| мама мыла раму |
+--------------------------------------+
1 row in set (0.01 sec)
But I failed to find a chartset to decode bfebb1e2c0c720b8c1c5e420202020202020202020202020 to anything human readable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With