views:

19

answers:

1

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.

A: 

This was an encoding issue - make sure your read the HTML in as UTF8.

colinramsay