Converting Rails Model attributes character encoding

At work we have some legacy database on MySQL with ISO-8859-1 (latin1) encoding. I like to use UTF-8 on my apps, though, so I wanted to convert the data on the database to UTF8 before using on the app, and then back to ISO-8859-1 before saving on the database.

Fortunately, this nice guy, Tom Bak, on the ruby-forum, made a plugin to allow this type of conversion on the fly. It is not available for download here, since blocks zip files, but stop by the forum and download it. While you are there, remember to say thanks to Tom Bak!

Thanks, Tom, great job!


~ by Dante Regis on February 13, 2008.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: