-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Charset problem when insert and update
PostPosted: Tue Jan 02, 2007 6:45 pm 
Newbie

Joined: Tue Apr 18, 2006 9:57 am
Posts: 18
Hi,

I have one database with Mysql 4.1, this the code of one's table:

CREATE TABLE `articulo` (
`nombre` varchar(50) character set latin1 NOT NULL default '',
`resumen` text collate latin1_spanish_ci,
`ruta` varchar(100) collate latin1_spanish_ci default NULL,
`link` varchar(100) collate latin1_spanish_ci default NULL,
`estado` varchar(10) collate latin1_spanish_ci default NULL,
PRIMARY KEY (`nombre`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;


All Databse have the charset latin1 and collate latin1_spanish_ci.
when I get the data, for example using a criterian all is ok. But when i use the update or save methods in the database the 'ñ' and 'á é í ó ú' converts to '?', i dont know why.

My Mysqld is configured all parameter with latin1 and latin1_spanish_ci.

I dont find the error.

Thanks.

[b]Hibernate version: 3.0

[b]Name and version of the database you are using: Mysql 4.1


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 5:25 am 
Regular
Regular

Joined: Thu Aug 17, 2006 4:50 am
Posts: 55
Location: Mallorca
try using utf-8.

espero que te ayude ! ;-)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 10:46 am 
Newbie

Joined: Tue Apr 18, 2006 9:57 am
Posts: 18
I solve the probem with a Servlet Filter, using the req.setCharacterEncoding("ISO-8859-1");

If some have the same problem I hope that this solve the problem


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.