[fpc-pascal] TSQLQuery.ApplyUpdates problem with UTF-8
Michael Van Canneyt
michael at freepascal.org
Fri Mar 14 12:53:22 CET 2014
On Fri, 14 Mar 2014, Dennis Poon wrote:
> Is TSQLQuery.AppleUpdate works with UTF8 string field content?
>
> I fetched a web page and extracted part of its content and appended it into
> TSQLQuery record's string field.
>
> The web page content is Chinese in UTF-8 encoding.
> I 'writeln' the content before appending it and it appeared normal in the
> console.
>
> The database is MYSQL 5.5 on ubuntu Intel 64-bit.
>
> However, when I use MYSQL command to
>
> select * from MYTABLE;
>
> the content appeared as garbage.
>
> I already specified the CHARSET=utf8 in the Create Table SQL.
Did you set the TSQLConnection.Charset property to UTF8 as well ?
Michael.
More information about the fpc-pascal
mailing list