Hi,
We're trying to search our database in Thai, but it seems the ruby
console doesn't recognise the characters.
Can someone shead some light on this please?
Some text input would be "à¸à¸£à¸¸à¸‡à¹€à¸—พฯ"
And the console will show
Processing ProductsController#getprovinces (for 192.168.150.1 at
2010-01-28 00:54:40) [GET]
Parameters: {"code"=>"à ¸à ¸£à ¸¸à ¸à ¹à ¸à ¸à ¸¯"}
Province Load (0.6ms) SELECT * FROM `provinces` WHERE (name like
'%à ¸à ¸£à ¸¸à ¸à ¹à ¸à ¸à ¸¯%') ORDER BY name ASC LIMIT 10
Completed in 10ms (View: 3, DB: 1) | 200 OK [http://gearbox/products/
getprovinces/?code=
%E0%B8%81%E0%B8%A3%E0%B8%B8%E0%B8%87%E0%B9%80%E0%B8%97%E0%B8%9E
%E0%B8%AF]
It doesnt seem to recognise the thai characters.
I've installed a Thai language pack on our server (ubuntu) but i'm
unsure where to turn from here.
Is it the charset in the html? do we need to pass some data to ruby to
tell it that there's thai coming?
Any help would be appreciated.
Thanks
Todd
on 2010-01-28 07:30
on 2010-01-28 07:37
Is your DB setup to use UTF-8 , I'm searching in Thai and Lao without an issue When you say the ruby console , what do you mean ? irb - script/console ? Justin
on 2010-01-28 07:43
On Thu, Jan 28, 2010 at 04:46, foxxx <todd@vexill.com> wrote: > Hi, > > We're trying to search our database in Thai, but it seems the ruby > console doesn't recognise the characters. > > Can someone shead some light on this please? I don't get exactly what issue you're describing, but this may apply: http://henrik.nyh.se/2008/03/irb-readline
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.