Fields with accented letters

Mar 22, 2014 at 8:39 AM
This dll is then best solution for mysql backup.
But i have finded a problem: if the name of field contain the
accented letters (à,è.ì,etc.), the file ".sql" created, contain this fields with converted the accented letters in "Ã " (with a spaces).
Example: if the field name is 'città', the field of file ".slq" will are CittÃ

do you know this problem?

Thanks and best regards
Coordinator
Mar 22, 2014 at 12:27 PM
Edited Mar 22, 2014 at 12:29 PM
Hi salvsena,

I have run a test for exporting a table name with "città" and a field name with "città" too,
but, I did not encounter the problem as you mentioned.
I'm currently not sure what is the cause that leads to this problem.

the name of "città" remains the same for both export and import process.
Coordinator
Mar 22, 2014 at 12:51 PM
Edited Mar 22, 2014 at 12:52 PM
I have created a temporary database with a table named "città", a field named "città" and a row too.

The temporary database is located at here:
server=sql4.freesqldatabase.com;user=sql434033;password=wV2*sQ5*;database=sql434033;
You may use the above connection string and test it at mysqlbackup.somee.com

The exported content shows that "città" still remains the same after export.

This is the export content:
-- MySqlBackup.NET 2.0.1
-- Dump Time: 2014-03-22 07:49:07
-- --------------------------------------
-- Server version 5.5.35-0ubuntu0.12.04.2 (Ubuntu)


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES latin1 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;


-- 
-- Definition of città
-- 

DROP TABLE IF EXISTS `città`;
CREATE TABLE IF NOT EXISTS `città` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `città` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

-- 
-- Dumping data for table città
-- 

/*!40000 ALTER TABLE `città` DISABLE KEYS */;
INSERT INTO `città`(`id`,`città `) VALUES
(1,'città');
/*!40000 ALTER TABLE `città` ENABLE KEYS */;


/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;


-- Dump completed on 2014-03-22 07:49:11
-- Total time: 0:0:0:3:137 (d:h:m:s:ms)
Mar 22, 2014 at 3:22 PM
Edited Mar 22, 2014 at 3:44 PM
thanks for your quick reply !

also in your export content i see "Ã ", please check this part "INSERT INTO città(id,cittÃ)":
/*!40000 ALTER TABLE `città` DISABLE KEYS */;
INSERT INTO `città`(`id`,`città `) VALUES
(1,'città');
/*!40000 ALTER TABLE `città` ENABLE KEYS */;
Coordinator
Mar 23, 2014 at 2:22 AM
Edited Mar 23, 2014 at 2:22 AM
Yup, but strange... it did not happened at my local computer...
maybe it is caused by the Character Set.

I'll check it in details and return to this later...
Mar 23, 2014 at 8:01 PM
Ok i wait your news
Thanks
Mar 27, 2014 at 8:16 PM
no news? do you have checked it?
Coordinator
Mar 28, 2014 at 2:07 AM
Edited Mar 28, 2014 at 2:15 AM
I'm still unable to locate the cause of problem.
I'm sorry that I'm unable to solve this problem at the moment.
I will keep you updated once this issue is solved.
Apr 11, 2014 at 6:57 PM
Edited Apr 11, 2014 at 6:57 PM
i think that you can do a replace in the string "selectSQL"
sample:
selectSQL = replace(selectSQL,"Ã ","à")
What do you think?
Coordinator
Apr 14, 2014 at 12:34 AM
can you please try with other accented letters?

and also try it at different location of the string with different accented letters
for example:

Middle:
ciÃtt
ciètt
Beginning
Ãcitt
ècitt
thanks
Coordinator
Sep 16, 2014 at 4:14 AM
Dear salvsena,

We have encounter another similar problem with Thai character.
I believe it is the same problem as this.

You may follow the discussion at: https://mysqlbackupnet.codeplex.com/workitem/25

I have posted the question at: http://stackoverflow.com/questions/25860253/mysql-return-incorrect-utf8-characters
Hoping some experts will share their insights for solving this problem.
Coordinator
Sep 16, 2014 at 4:29 AM
Hi salvsena,

My current solution for this is to create a database with default character set of UTF8.
The error does not come from my codings, it comes from MySQL dot Net Connector which developed by oracle.

It seems that MySql.Data.DLL work best with CharSet of utf8 when handling utf8 characters.
Coordinator
Sep 17, 2014 at 5:59 AM
Hi salvsena,

I have received confirmation of the solution of this issue.
Another programmer had confirmed that by altering Database's Default Character Set to UTF8,
the problem will solve.

You may have a look at this issue: https://mysqlbackupnet.codeplex.com/workitem/25