Re: [fpc-pascal] TSQLQuery.ApplyUpdates problem with UTF-8

2014-03-25 Thread Michael Van Canneyt
On Tue, 25 Mar 2014, Dennis Poon wrote: By the way, why isn't a semicolon required at the end of SET NAMES 'utf8' command? I tried both with and without semicolon and neither raise an error. Seems, that MySQL is tolerant to this. MySQL supports MULTI_STATEMENTS, which enables client to p

Re: [fpc-pascal] TSQLQuery.ApplyUpdates problem with UTF-8

2014-03-25 Thread Tomas Hajny
On Tue, March 25, 2014 09:56, Dennis Poon wrote: > >>> >>> By the way, why isn't a semicolon required at the end of SET NAMES >>> 'utf8' command? I tried both with and without semicolon and neither >>> raise an error. >> Seems, that MySQL is tolerant to this. >> MySQL supports MULTI_STATEMENTS, whi

Re: [fpc-pascal] TSQLQuery.ApplyUpdates problem with UTF-8

2014-03-25 Thread Dennis Poon
By the way, why isn't a semicolon required at the end of SET NAMES 'utf8' command? I tried both with and without semicolon and neither raise an error. Seems, that MySQL is tolerant to this. MySQL supports MULTI_STATEMENTS, which enables client to pass multiple statements separated by ";" in

Re: [fpc-pascal] TSQLQuery.ApplyUpdates problem with UTF-8

2014-03-24 Thread LacaK
Dennis Poon wrote / napísal(a): LacaK wrote: Dennis Poon wrote / napísal(a): I tried, the results are: @@character_set_client : utf8 @@character_set_connection : latin1 @@character_set_database : latin1 Dennis, do you received my reply?: IMO @@character_set_connection is wron

Re: [fpc-pascal] TSQLQuery.ApplyUpdates problem with UTF-8

2014-03-24 Thread Dennis Poon
LacaK wrote: Dennis Poon wrote / napísal(a): I tried, the results are: @@character_set_client : utf8 @@character_set_connection : latin1 @@character_set_database : latin1 Dennis, do you received my reply?: IMO @@character_set_connection is wrong and must be utf8. I will try fix

Re: [fpc-pascal] TSQLQuery.ApplyUpdates problem with UTF-8

2014-03-21 Thread LacaK
Dennis Poon wrote / napísal(a): I tried, the results are: @@character_set_client : utf8 @@character_set_connection : latin1 @@character_set_database : latin1 Dennis, do you received my reply?: IMO @@character_set_connection is wrong and must be utf8. I will try fix it, but first c

Re: [fpc-pascal] TSQLQuery.ApplyUpdates problem with UTF-8

2014-03-20 Thread Dennis Poon
I tried, the results are: @@character_set_client : utf8 @@character_set_connection : latin1 @@character_set_database : latin1 Dennis, do you received my reply?: IMO @@character_set_connection is wrong and must be utf8. I will try fix it, but first can you try as workaround this: - a

Re: [fpc-pascal] TSQLQuery.ApplyUpdates problem with UTF-8

2014-03-20 Thread LacaK
Dennis Poon wrote / napísal(a): I tried, the results are: @@character_set_client : utf8 @@character_set_connection : latin1 @@character_set_database : latin1 Dennis, do you received my reply?: IMO @@character_set_connection is wrong and must be utf8. I will try fix it, but fir

Re: [fpc-pascal] TSQLQuery.ApplyUpdates problem with UTF-8

2014-03-18 Thread Dennis Poon
LacaK wrote: Dennis Poon wrote / napísal(a): Dennis Poon wrote: Michael Van Canneyt wrote: On Fri, 14 Mar 2014, Dennis Poon wrote: the content appeared as garbage. I already specified the CHARSET=utf8 in the Create Table SQL. Did you set the TSQLConnection.Charset property to UT

Re: [fpc-pascal] TSQLQuery.ApplyUpdates problem with UTF-8

2014-03-18 Thread LacaK
Dennis Poon wrote / napísal(a): Dennis Poon wrote: Michael Van Canneyt wrote: On Fri, 14 Mar 2014, Dennis Poon wrote: 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 ?

Re: [fpc-pascal] TSQLQuery.ApplyUpdates problem with UTF-8

2014-03-18 Thread LacaK
Dennis Poon wrote / napísal(a): Dennis Poon wrote: Michael Van Canneyt wrote: On Fri, 14 Mar 2014, Dennis Poon wrote: 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 ?

Re: [fpc-pascal] TSQLQuery.ApplyUpdates problem with UTF-8

2014-03-17 Thread Dennis Poon
Dennis Poon wrote: Michael Van Canneyt wrote: On Fri, 14 Mar 2014, Dennis Poon wrote: 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 ? I set it to utf8 (UTF-8 will raise

Re: [fpc-pascal] TSQLQuery.ApplyUpdates problem with UTF-8

2014-03-14 Thread Dennis Poon
Michael Van Canneyt wrote: On Fri, 14 Mar 2014, Dennis Poon wrote: 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 ? I set it to utf8 (UTF-8 will raise exception) but still

Re: [fpc-pascal] TSQLQuery.ApplyUpdates problem with UTF-8

2014-03-14 Thread Michael Van Canneyt
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 be

[fpc-pascal] TSQLQuery.ApplyUpdates problem with UTF-8

2014-03-14 Thread Dennis Poon
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