My setup is:

linux + Ruby 1.9 + rails 2.3.8 + mongodb + mongo_mapper

I followed http://railscasts.com/episodes/194-mongodb-and-mongomapper, that everything is OK first. I can insert English strings successfully, but when I insert some Chinese strings, it inserted, but can't be displayed.

The web page shows an exception:

invalid byte sequence in US-ASCII 

I use mongo command to see the data in mongodb, and it's correct. But I don't know why rails can't display them.

thanks in advance

Edit
Report