lcStringConn="Driver={MySQL ODBC 3.51 Driver};Server=&lcServer;Port=3306;Option=16384;Stmt=;Database=&lcDatabase;Uid=&lcUser;Pwd=&lcPassword"
I wrote few records into MySQL table by using this VFP's form where some fields contained national (diacritics) characters and records were inserted into table without hassle. I made few time connect/disconnect from VFP, I was flipping through the records left and right but characters showed right as they was when I wrote them. Then, I made PHP script, saved it encoded as UTF-8 and I wrote also in header<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="hr"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="hr" /> </head>but national characters appeared wrong, like as they looks odd in table preview of some MySQL management software (MySQL Front or phpMyadmin). I tried to solve it by changing encoding of PHP-script in meta-tags and/or saving as encoded file (ANSI, UTF8) but w/o success. Then I tried to add a option in connection string: charset=UTF8, but records with national chars now appeared incorrectly in VFP form, then I changed ODBC to new one but when I try to add or update records with even single national char into any form's field then ODBC reported error:
Connectivity error:[MySQL][ODBC 3.51 Driver][mysqld-5-5-12] Incorrect string value: '\xE6 ...' for column 'lastname' at row 1and 4 buttons: Cancel, Suspend, Ignore and Help. What ever I push there is no way to close view nor make exit from VFP except by using Task manager . Now I don't know what kind of encoding to pick in order to make national characters is displayed correctly in VFP forms and in PHP scripts too under running Win7 (code page windows 1250)!? Is there some kind of conversion during update from VFP or before loading data from MySQL table? I don't have a idea what A thing caused such behavior of VFP & PHP? Is here some members who had similar problems with displaying and recording national characters? Some conclusion for share? Thank you in advance.