2 messages in com.mysql.lists.mysql-esRe: Problemas con caracteres especial...| From | Sent On | Attachments |
|---|---|---|
| Carlos de Mena | 22 Aug 2006 05:46 | |
| Amable Ortega | 23 Aug 2006 23:19 |
| Subject: | Re: Problemas con caracteres especiales al restaurar la BD![]() |
|---|---|
| From: | Amable Ortega (amb_...@hotmail.com) |
| Date: | 08/23/2006 11:19:36 PM |
| List: | com.mysql.lists.mysql-es |
Buenas Carlos
A mi me ocurrió lo mismo y la solución fue hacer el backup con phpmyadmin y asegurarme que todos los campos(que almacenan caracteres, char, varchar, etc) de mis tablas fueran UTF8_spanish_ci y cuando importe esos datos exportados(con phpmyadmin), hacerlo también con phpmyadmin y asegurarme que el juego de caracteres del archivo que importo este con la opción a UTF8.
Eso es todo, espero que lo logres hacer, después de muchos otros intentos, esto fue lo que me funciono.
Espero haber sido claro...
Buena Suerte :)
""Carlos de Mena"" <car...@dinalan.es> escribió en el mensaje news:00e101c6c5e9$15390cb0$3000...@dinalan.es...
He hecho un backup de mi base de datos con MySQLdump usando "--default-character-set=latin1" y en el fichero generado estan todos los datos y se ven los caracteres con acentos, las ñ, etc. correctamente, pero si restauro una tabla usando el fichero:
-- MySQL dump 10.10
-- -- Host: 127.0.0.1 Database: da -- ------------------------------------------------------ -- Server version 5.0.18-nt
/*!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 */; use da
-- -- Table structure for table `tiposhf`
--
DROP TABLE IF EXISTS `tiposhf`; CREATE TABLE `tiposhf` ( `IDTipoHF` int(10) unsigned NOT NULL auto_increment, `TipoHF` varchar(150) NOT NULL default '', PRIMARY KEY (`IDTipoHF`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- -- Dumping data for table `tiposhf`
--
/*!40000 ALTER TABLE `tiposhf` DISABLE KEYS */; LOCK TABLES `tiposhf` WRITE; INSERT INTO `tiposhf` VALUES (1,'Al Pedido'),(2,'A la entrega del Libro de detalle'),(3,'A la entrega del Software'),(4,'A la entrega del Hardware'),(5,'Al comienzo de la Puesta en Marcha'),(6,'A la entrega de la Documentación'); UNLOCK TABLES; /*!40000 ALTER TABLE `tiposhf` 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 */;
No me restaura los caracteres bien, el acento en "A la entrega de la Documentación" no sale bien.
Restauro haciendo:
mysql -u usuario - p password < fichero.sql
El fichero.sql contiene lo que os he mostrado.
He probado:
mysql -u usuario - p password --default-character-set=latin1 < fichero.sql
y tampoco funciona, aunque no da error.
¿Alguna idea?
¿Alguien sabe que puede pasar?
Carlos.




