Jump to content
Sign in to follow this  

FMPro & mySQL with UTF8 Character Sets

Recommended Posts

Hallo everybody,

I have one MySQL database, which is used via web interface (php) and FileMaker.

When I try to add/change records with some of Czech or Serbian characters (like ž š đ č ć ů ů á í ý) using web interface, everything works perfect.


Character set of MySQL database:

SET character_set_client = 'latin1';

SET character_set_connection = 'latin1';

SET collation_connection = 'latin1_swedish_ci';

After command “SHOW VARIABLES LIKE 'character_set%';” using MySQL_Front or Navicat, program bring to me:

character_set_client utf8

character_set_connection utf8

character_set_database utf8

character_set_results utf8

character_set_server utf8

character_set_system utf8

character_sets_dir /usr/share/mysql/charsets/

And after “SHOW VARIABLES LIKE 'collation%';”, Navicat bring to me:

collation_connection utf8_general_ci

collation_database utf8_general_ci

collation_server utf8_general_ci


But, when I try to add/change some records using FileMaker and JDBC (via PDM plugin) or php (via schubec PHPowered plug-in) results are bad.

When I use schubec PHPowered plug-in, my scripting looks like is:

SCPH_PHP_eval("$conn = mysql_connect("server","username","password");" & &

"mysql_select_db("database",$conn);" & &

"$test1 = mysql_query("SET character_set_client = 'latin1'",$conn);" & &

"$test1 = mysql_query("SET character_set_connection = 'latin1'",$conn);" & &

"$test1 = mysql_query("SET collation_connection = 'latin1_swedish_ci'",$conn);" & &

"$result = mysql_query("update mysql query action",$conn) or die(mysql_error()); ")

When I use PDM plugin, my scripting looks like:

-After opening connection:

External("SQL-doSQL";"SET character_set_client = 'latin1';")

External("SQL-doSQL";"SET character_set_connection = 'latin1';")

External("SQL-doSQL";"SET collation_connection = 'latin1_swedish_ci';")

I have another try; set up character setting of connection trough SQL URL:

External("SQL-setURL"; “jdbc:mysql://server/database?characterEncoding=ISO8859_1&connectionCollation=latin1_swedish_ci”)

Every time results are bad, in MySQL database (and through web interface)characters looks wrong.

Does anyone have experience in solving this problem?


Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.