2012/4/2 YAN HONG YE <yanhong...@mpsa.com>: > when I run this following code , the html file encoding changed to > GB2312,not utf-8, I don't know why? > system("echo ^<table border='1'^> >mm.html"); > system("sqlite3 -html -header foods.db \"select * from dzh where > qph15>10;\" >>mm.html"); > system("echo ^</table^> >>mm.html");
You're windows user, right? system() in windows will convert all things to System Codepage (CP_ACP), so please use C bindings and write output in C but not using system(). > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users