I have this SQL:
INSERT INTO v3_peers
(torrent, peer_id, ip, ipv6, port, smoke_ip, uploaded, downloaded, up_ofset, down_ofset, remaining, started, last_action, connectable, userid, agent)
VALUES
('13471', '-UT2200-ĂZŤjśŻl‰şđ^', '69.64.147.243', '2001:0:5ef5:79fd:14e6:7214:2a5f:5811', '58262', '', '0', '0', '0', '0', '0', '1334945327', '1334945327', 'yes', '1', 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19')
When it is executed in script it is saved to db, but peer_id is only “-UT2200-” and browser give me dialog to save file with name of sript and content whitch should be returned as php output in plain/text
When I insert this into db by phpmyadmin everything is ok.
peer_id have datatype varchar(255)
Any ideas what is wrong?
Ok, I found the error. When i am comparing datas inserted in db and actual data from $peer_id=$_GET[peer_id] variable in SQL like:
then I got error because peer_id in db is not like peer_id, but when i use
it works perfectly. Encoding of column peer_id must be set to utf8-unicode-ci NOT utf8-general-ci!!
So, there was not error in encoding (missing characters in phpmyadmin as I wrote in question are not realy missing but hidden because of encoding) but error is in other scrip.
Thanks all for your time.
I hope this will help someone in future.