I ask a question in stackoverflow: http://stackoverflow.com/q/30970840/1054800, There is no answer!
After runing rails console, I can execute the following query:
1.9.3-p551 :001 > ActivityObject.where(:title => “kiketurpis integer aliquet”)
And I got a unique answer existed in database. But if I enter:
1.9.3-p551 :002 > ActivityObject.where(:title => ‘第一个纵纹’)
(In double quotes there is a Chinese string.) I got all records in table activity_objects, which means I can not use Chinese string in predicate where.
Also, I can directly query this record using the Chinese string under psql:
vish_development=# select * from activity_objects where title = ‘第一个纵纹’;
So my question is that what should I do for enabling CJK string in ActiveRecord’s where or like this?