Xojo Conferences

« Tip of the day: Web E… | Home | Real World registrati… »

Warning: MySQLCommunityPlugin

Today I got a crashlog in DrawString method. Well, that happens, but the real reason here is that the MySQLCommunityPlugin from Real Software used by the client to write the database project, returns strings without defined text encoding. This is no big problem for most US people as they don't use accents or umlauts often. But European or Asian people soon have trouble.
So the trouble is that the database uses cp1252 West European. Now if you pass a string without defined text encoding (or wrong text encoding) to drawstring, it can crash. Simply trying to interpret those bytes in the string as UTF-8 will make trouble and lead to a crash. Keep that in mind if you see a crash in DrawString!
The fix is: Use DefineEncoding everywhere you get a string from database without encoding set or switch to MBS SQL Plugin.
see also Feedback case 22836 and Feedback case 22727.
17 10 12 - 11:59
two comments

So true, Christian.

For a general Feature Request on Encoding handling for Database Plugins, please vote for feedback://showreport?report_id=14166
Tobias Bussmann - 18 10 12 - 23:17

Great blog.
santa (Email) - 06 04 13 - 15:04

Remember personal info?

Emoticons / Textile

Hide email:

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.