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