YAN HONG YE <[email protected]> wrote:

> Richard Hipp <[email protected]> wrote:
>
>> On Sun, Apr 1, 2012 at 11:21 PM, Roy Tam <[email protected]> wrote:
>
>> 2012/4/2 YAN HONG YE <[email protected]>:
>> > 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().
>>
>
>The open-source Fossil <http://www.fossil-scm.org/> version control system
>used by SQLite contains an implementation of system() that correctly deals
>with UTF8 even on windows systems.  Perhaps the OP can copy some of the
>code from that.  LInk:
>
>    http://www.fossil-scm.org/fossil/artifact/70e4b10c0208b3?ln=685-707
>
> But I don't know how to write.

Well, perhaps today you don't know how to write code that uses the
example, but if you take some time to learn it, you may be able to do it
in a few weeks or months.
Or you may want to hire someone who can do it for you.

-- 
Regards,

Kees Nuyt

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to