I'm using a Ruby script that parses an XML file and inserts the information into a MySQL database. It works perfectly fine, but it's giving me a headache now that my XML files have strings in Portuguese
Detail: I'm completely new to Ruby.
For some reason I'm stuck with Ruby 1.8 and I've been reading that this version has peculiarities to handle Strings. I have already confirmed that both the XML file and the MySQL collation and tables are UTF-8.
I've also tried, unsuccessfully, to encode the string before sending it to the bank using a hint found in this post as follows :
@text = ::Iconv.conv('UTF-8//IGNORE', 'UTF-8', attributes['Text'] + ' ')[0..-2]
After inserting the eye data via PHPMyAdmin the strings are crazy. For example: 'us' instead of 'no'.
Any ideas how I can approach the problem?