Problem with charset

Feb 5, 2013 at 11:59 AM
Hello, first I wanna say thanks for this great library, is really really useful.

Now my problem... With this new version I've been having a few issues with the charset of my database; I'm using latin1_spanish_ci on every table and on the database itself, when I make a backup everything goes fine... the problem is when I try to restore, every accented letter and every char like "ñ,ç... etc" it turns into another thing.
My code is based on the application demo and I'm choosing the charset I need before make any import.

Hope you can help me with this issue.

Thanks in advance and sorry if my english level is kinda poor.
Coordinator
Feb 5, 2013 at 5:02 PM
Hi, can you post a content of an exported sql file with a simple table and a few rows of accented letters.

and I wish to know the your database environment charset.
You may obtain the charset variables in the demo form.

example:
MySQL default charset
database default charset
etc...
Feb 8, 2013 at 4:06 PM
Hi, thanks for your answer.

I wanted to paste the encrypted code that I've been using and the regular code... but due to 10000 chars limit I'll only paste the not encrypted one.

Also, the enviroment charset is latin1_spanish_ci.

-- MySqlBackup.NET dump 1.5.7 beta
-- Dump time: 2013-02-08 11:02:51

-- Server version 5.5.28-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 /;
/!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE /;
/!40103 SET TIME_ZONE='+00:00' /;
/!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 table usuarios

DROP TABLE IF EXISTS usuarios;
CREATE TABLE IF NOT EXISTS usuarios (
idUsuario int(11) NOT NULL AUTO_INCREMENT,
Nombre varchar(200) COLLATE latin1_spanish_ci NOT NULL,
APaterno varchar(50) COLLATE latin1_spanish_ci NOT NULL,
AMaterno varchar(50) COLLATE latin1_spanish_ci NOT NULL,
Direccion varchar(200) COLLATE latin1_spanish_ci NOT NULL,
Alta bit(1) NOT NULL,
Imagen longblob,
fechaAlta datetime NOT NULL,
fechaBaja datetime NOT NULL,
Usuario varchar(20) COLLATE latin1_spanish_ci NOT NULL,
Contrasena varchar(500) COLLATE latin1_spanish_ci NOT NULL,
idPerfil int(11) NOT NULL,
PRIMARY KEY (idUsuario),
UNIQUE KEY unique (idUsuario) USING BTREE,
UNIQUE KEY usario_unique (Usuario) USING BTREE,
KEY usuarios_perfiles (idPerfil),
CONSTRAINT usuarios_perfiles FOREIGN KEY (idPerfil) REFERENCES perfiles (idPerfil) ON DELETE NO ACTION ON UPDATE NO ACTION

) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

-- Dumping data for table usuarios

/*!40000 ALTER TABLE usuarios DISABLE KEYS */;
INSERT INTO usuarios (idUsuario,Nombre,APaterno,AMaterno,Direccion,Alta,Imagen,fechaAlta,fechaBaja,Usuario,Contrasena,idPerfil) VALUES
(1,'Alejandro','Concha','Uicab','C. 145 # 232 x 88 y 90',1,NULL,'2013-02-01 00:00:00','2013-02-01 00:00:00','alex','HtycGoLW+oVEOXjD/OoXIw==',1),
(2,'Mauricio','Lago','Hagar','Calle lo que sea',1,NULL,'2013-02-02 00:00:00','2013-02-02 00:00:00','maulago','n9WgrCEWaKi7MZYAdnNRdODnKcOOI0gYXEJFNSWBm6I=',1),
(3,'Ricardo Aarón','Daw','Ceballos','12345',1,NULL,'2013-02-05 00:00:00','2013-02-05 00:00:00','rdaw','AzCaEYSDqk+VtPa6adUUCw==',1);
/*!40000 ALTER TABLE usuarios ENABLE KEYS */;


/!40103 SET TIME_ZONE=@OLD_TIME_ZONE /;
/!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 /;
Coordinator
Feb 9, 2013 at 1:08 AM
hi, try to get this too:

at the demo form:
Image

Image
Feb 9, 2013 at 3:13 AM
There it goes :)

Image
Coordinator
Dec 24, 2013 at 2:05 PM
Hi, new version is released.
You may want to have a try on it :)