[Gambas-user] Issue 402 in gambas: String charset is screwed up if the MySQL connection is temporary lost

gambas at ...2524... gambas at ...2524...
Mon Feb 4 22:36:55 CET 2013


Status: New
Owner: ----
Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any  
Desktop-Any GUI-Any

New issue 402 by uAle... at ...626...: String charset is screwed up if the  
MySQL connection is temporary lost
http://code.google.com/p/gambas/issues/detail?id=402

1) Describe the problem.

When using a MySQL database with a string field with a special characters  
like "Celsius" works fine. The gambas string has the proper UTF-8  
characters. Only if the connection is broken, the gambas string is screwed  
up, it almost looks like it changed charset from UTF-8 to ISO8859-1.

When UTF-8 it prints:
°C

When the connection is broken, the same routine prints:
�C

2) GIVE THE FOLLOWING INFORMATIONS (if they are appropriate):

Version: TRUNK
Revision: r5518
Operating system: Linux
Distribution: LUbuntu 10.04LTS
Architecture: x86
GUI component: QT4
Desktop used: LXDE

$ mysql --version
mysql  Ver 14.14 Distrib 5.1.66, for debian-linux-gnu (i486) using readline  
6.1

3) Provide a little project that reproduces the bug or the crash.

Attach is the MySQL-Charset.tar project and "domotiga-empty.sql".

4) If your project needs a database, try to provide it, or part of it.

Attached.

5) Explain clearly how to reproduce the bug or the crash.

To reproduce it, do it as follows:
- Import the domotiga-empty.sql into your MySQL database
- Start the MySQL-Charset project
- It will print out correctly: °C
- Restart the MySQL with "service mysql restart"
    NOTE: This needs to happen within the 5 seconds wait, else the  
application exits with an error
- After the restart you will notice it print out incorrectly: �C

6) By doing that carefully, you have done 50% of the bug fix job!

IMPORTANT NOTE: if you encounter several different problems or bugs, (for
example, a bug in your project, and an interpreter crash while debugging
it), please create distinct issues!

Attachments:
	MySQL-Charset.tar  20.0 KB
	domotiga-empty.sql  234 KB



More information about the User mailing list