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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Who Viewed the Topic

    1 member has viewed this topic:

Important Information

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