Welcome Guest, Not a member yet? Register   Sign In
Problems with some chars on a DB insert
#1

[eluser]Isern Palaus[/eluser]
Hello,

I'm getting this error:

Quote:An Error Was Encountered

Error Number: 1406

Data too long for column 'body' at row 1

INSERT INTO `posts` (`title`, `url_title`, `body`, `created_on`) VALUES ('El hombre de hielo', 'el-hombre-de-hielo', '

Este hombre que corre desnudo por la nieve se llama Wim Hof. La temperatura exterior es de 15 grados bajo cero. Lleva corriendo más de una hora a escasos kilómetros del Polo Norte y, aunque sus pies descalzos se apoyan directamente sobre el hielo, no muestra ningún síntoma de hipotermia. A Wim Hof le han hecho todo tipo de pruebas para estudiar su capacidad para resistir el frío. En las mismas circunstancias, cualquier ser humano moriría al instante o sufriría graves lesiones.', 1205361156)

If I delete the accents on the letters like í to i works fine. How can I fix them?

Thanks in advance,
-- Isern Palaus
#2

[eluser]mironcho[/eluser]
Hi Isern,
Given error message says "Data too long for column ‘body’ at row 1" - what type, size and collation is this field 'body'?
#3

[eluser]mikeyhell[/eluser]
This is a known bug(we'll not really bug w/ mysql) but issue with sql code written on an xp machine or some flavors of linux. I had the same problem a while back and found that for some reason my sql had to be encoded using latin1 instead of utf8. What are you using to edit the code?
#4

[eluser]mikeyhell[/eluser]
btw mironcho, your avatar pic looks very similar to an area I frequently mtb at. Wasn't taken at palo duro canyon was it?
#5

[eluser]mironcho[/eluser]
[quote author="mikeyhell" date="1205389666"]btw mironcho, your avatar pic looks very similar to an area I frequently mtb at. Wasn't taken at palo duro canyon was it?[/quote]

No - it was taken in one park in Sofia, Bulgaria Smile
#6

[eluser]Isern Palaus[/eluser]
Hey,

Sorry for not responding.

I'm using this table:
Code:
CREATE TABLE `posts` (
`id` int(5) NOT NULL auto_increment,
`title` varchar(64) NOT NULL,
`url_title` varchar(64) NOT NULL,
`body` text NOT NULL,
`created_on` varchar(10) default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

In latin1. :S

Thank you in advance,
-- Isern Palaus




Theme © iAndrew 2016 - Forum software by © MyBB