Ruby on Rails Tuesday, June 23, 2015

On Tuesday, June 23, 2015 at 3:02:36 PM UTC+3, Dillon Peng wrote:

> 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?

I'm not aware of any rails setting that controls this, however there are a few things that could come into play:

- what is the encoding of that string? Current versions of ruby default to Utf-8, but I don't think 1.9 did
- what are postgres' collation / encoding settings ? This will affect how strings are compared, which is super important in unicode, with different normalisation forms and so on.

Fred

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/5aef2caa-0f91-4ecb-a903-c85e01b6e3fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment