This project is archived and is in readonly mode.
activerecord problem when create with characters with accents or special characters
Reported by Alexander C | August 13th, 2010 @ 12:19 AM
Rails version: 2.3.5
Ruby version: 1.8.7
I use the activerecord in order to create a record with special characters contained in a string, then when I look in the database it shows the string broken, ej. before: "texto con carácteres especiales como ñ y otros" after insert or create: "texto con car", the rest of string is missed.
When I check the log I see:
INSERT INTO posts
(created_at
,
title
, excerpt
, updated_at
,
blog_id
, publish
, content
,
classification_id
, author_id
,
comments_count
) VALUES('2010-08-12 22:20:28', 'titulo
con caracteres especiales
áéíóúÁÉÍÓÚÑñ
más caracteres
"-,'¿?!ª\|}´{¨¨&%$#@; final del
titulo', 'intro de la publicación', '2010-08-12 22:20:28',
1, 0, 'prueba [#5](/projects/8994/tickets/5 "Ticket #5"): contenido
de la publicación', NULL, 1, 0)
Apparently all is fine, but in the database appears this:
title excerpt content
titulo con caracteres especiales intro de la publicaci prueba #5: contenido de la publicaci
I using the following configuration:
Adapter: mysql
Connection Encoding: utf8
Table Character-set is: utf8
Table Collation is: utf8_general_ci
Comments and changes to this ticket
-
Andrea Campi October 16th, 2010 @ 11:53 PM
- Tag changed from activerecord, create, insert, rails2.3, special-chars to 2-3-stable, activerecord, create, insert, special-chars
-
Santiago Pastorino February 2nd, 2011 @ 04:29 PM
- State changed from new to open
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
Santiago Pastorino February 2nd, 2011 @ 04:29 PM
- State changed from open to stale
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
- Nobody is watching this ticket.