$res = odbc_exec($conn, 'set names utf8');放在插入语句前不行就把sql打印出来,手动复制到mysql控制台执行,看有什么错
在执行sql之前,设置字符编码
$res = odbc_exec($conn, 'set names utf8');$res = odbc_exec($conn, $str_sql);
你编辑器的编码是utf8吗?
set names utf8