Hi All, I have a ruby script which picks up data from a text file and then adds the corresponding data into my postgresql database. However, it not picking up "diacritic" i.e. characters like "Á, é, ó" etc and throwing the following error.
RuntimeError: ERROR C22021 Minvalid byte sequence for encoding "UTF8": 0xe9204d HThis error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding". Fwchar.c L1534 Rreport_invalid_encoding: SELECT * FROM "contacts" WHERE (preferred_given_names = E'ZahidT Miguel' and surname = E'Baeza Tordesillas' and (email_work = E'[email protected]' OR email_work IS NULL)) LIMIT 1undefined local variable or method `some_string' for #<DataImporter:0x55f0cbc @file="d:\\CGCtest.txt"> I've created the database with UTF-8 encoding. In fact I can manually add spanish characters directly into the database, however, not through the script and I want the script to do this for me. Any help would be much appreciated. Thanks, Zahid -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

