« 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. The biggest plugin in space...
17 10 12 - 11:59