The problem: We use a series of scripts to push our data from FMP to a MySQL database. Suddenly, MySQL decided to refuse all incoming calls, sending back a hitherto unforeseen error code every time it hit a Unicode character: "ODBC Error: [Actual][MySQL] Incorrect string value: <some hex value> for column <fieldname> at row <number>".
In other words, its recognition of Unicode chars had somehow switched off.
As a side effect, our website went down. Not good, as they say.
The solution: Turns out the fault was a little switch in FMP Server. (I'm still not sure what caused this to flip the wrong way.) Actually, to be accurate, it was a problem in the ODBC settings, not on the server itself, but on the server's machine.
If you're having trouble with FMP Server 10, MySQL and Unicode on a Mac, try the following:
- Open the "ODBC Administrator" application.
- You'll see several options on the window that opens. Select the second one ("System DSN").
- Select the MySQL DSN, and hit "Configure" (on the right of the window).
- Click through the configuration options until you get to the "Database" window.
- Select "Advanced Language".
- A sub-window pops up, with five checkboxes:
- "Auto-detect..." — Uncheck it.
- "to send text" — Uncheck it.
- "to receive text" — Uncheck it.
- "Return Unicode data types" — Check it.
- "Set Application Locale..." — Check it.
Happy DBAing! B-)
No comments:
Post a Comment