Hi, I'm having a related utf8-problem I would like to share in this
When I'm submitting swedish characters (such as åäö) in a ajaxcall
(:observe_field) the åäö-characters gets translated into weird
characters that causes the postgresql to display the error:
PGError: ERROR: invalid byte sequence for encoding "UTF8": 0xf6f6f6f6
Its pretty clear that you are inserting high bit latin-1 (?) characters into
your UTF-8 database. (?) I am assuming that scandinavian countries
are part of the latin-1 (ISO-8859-1) character set.
Anyone know a fix?
Are you (1) typing these characters into your source file
or are you (2) letting the user enter them directly from a form?
(1) I suspect you will need to escape the characters in your source
file. I don't know enough about using non-ASCII characters in Ruby
source to help you further
(2) should work as long as you just let Rails pass them through,
and screen them for being valid utf-8. Make sure your browser
knows the page is UTF-8 (you will need to do something in your
Rails config to enforce this) and that any POSTs are encoding
the data as UTF-8.