MySQL is set as UTF-8(utf8_general_ci
: MySQL, Table, Column).
I can SELECT varchar value as original double byte character via ADODB
and ASP
(Legacy VB Script). These characters are inserted from phpMyAdmin.
ASP pages are saved as encoding Shift_JIS
and ADODB connection parameter is indicated as dsn=...;APP=ASP Script;STMT=SET CHARACTER SET SJIS;
But when I will UPDATE field from ASP, updated varchar string has NO(ommited) double byte character but has single byte character in phpMyAdmin.
How to fix these update/insert issue? I tried to change MySQL charset to sjis but it wouldn't fix the issue.
I could resolve the issue. Route cause is in SQL.
UPDATE users SET name = N'aaaa' WHERE id = N'BBB';
This 'N' makes characters boroken. I was using ASP program with MS-SQL Server english version and this 'N' must be attached. I must remove all these 'N's when move to MySQL from MS-SQL!