I'm saving whole HTML documents in the database with ActiveRecord. I can see in the logs that correct INSERT statements are being generated and sent to MySQL but when I actually look in the database after the save has completed, the content is truncated.
It appears that
entities in the document are causing this truncation. I can URL encode the document or 开发者_如何学编程something to avoid this happening but I'd much rather understand why this is happening.
This was an encoding issue - make sure your read the HTML in as UTF8.
精彩评论