« Version 10 | Home | Special Plugins for y… »

SQL Plugin and Textencoding

As you may know we have a SQL plugin for REALbasic. Whether you should use the database plugins coming with REALbasic or the MBS REALbasic SQL Plugin is a good question and it depends on what you need. Some prefer our plugin because of stability or for more features like bulk record reading or better blob handling.

For the text encoding, if you have trouble, you should check a few things:
  1. What native text encoding does the platform has the database server is running on?
  2. What text encoding is the database server using for storage?
  3. What text encoding does the database API use for clients over network?
  4. What text encoding do you use for query strings?
  5. What text encoding is set for the C library?

For 3 you should check the database manual. For example mysql can be configured to use ISO Latin 1 text encoding which will make trouble if you store Asian characters.
For 4 you may need to make sure that all text sent to the plugin has a known encoding. Internally the plugin converts text to UTF8 or Unicode and later into the encoding the database client needs.
For 5 you should look on a call like SQLGlobalsMBS.Setlocale(0,"UTF8") because that changes the text encoding conversion functions the plugin uses.

But once everything is setup correctly you can enjoy a nice and stable database access. The biggest plugin in space...
14 12 09 - 10:18