Hi:

O.S Windows XP sp3
Ruby 1.8.6

I am working with ruby using DBI::Mysql, and the returned descriptions
are not displayed ok. The puts command is displaying wrong characters,
when the text has special chars like á.

My program here :

puts "Olá Mundo!"; # for test

require "dbi";

begin
    # connect to the MySQL server
    dbh = DBI.connect("DBI:Mysql:test:localhost", "test",
"q3der3fe5ahy");

    sth = dbh.execute("SELECT * FROM uf ");

    sth.each do |row|
        puts 'ID:' + row[0].to_s + ' Mi: ' + row[1] + 'Decrição: ' +
row[2];
    end
    sth.finish;
rescue DBI::DatabaseError => e
     puts "An error occurred";
     puts "Error code: #{e.err}";
     puts "Error message: #{e.errstr}";
ensure
     # disconnect from server
     dbh.disconnect if dbh;
end

//=========== Result
Ol?? Mundo!
ID:1 Mi: AC Decriþ??o: Acre
ID:2 Mi: AL Decriþ??o: Alagoas
ID:3 Mi: AM Decriþ??o: Amazonas
ID:4 Mi: AP Decriþ??o: Amap??
ID:5 Mi: BA Decriþ??o: Bahia
ID:6 Mi: CE Decriþ??o: Cear??
ID:7 Mi: DF Decriþ??o: Distrito Federal
ID:8 Mi: ES Decriþ??o: Esp??rito Santo
ID:9 Mi: GO Decriþ??o: Goi??s
ID:10 Mi: MA Decriþ??o: Maranh??o
ID:11 Mi: MG Decriþ??o: Minas Gerais
ID:12 Mi: MS Decriþ??o: Mato Grosso do Sul
ID:13 Mi: MT Decriþ??o: Mato Grosso
ID:14 Mi: PA Decriþ??o: Par??
ID:15 Mi: PB Decriþ??o: Para??ba
ID:16 Mi: PE Decriþ??o: Pernambuco
ID:17 Mi: PI Decriþ??o: Piau??
ID:18 Mi: PR Decriþ??o: Paran??
ID:19 Mi: RJ Decriþ??o: Rio de Janeiro
ID:20 Mi: RN Decriþ??o: Rio Grande do Norte
ID:21 Mi: RO Decriþ??o: Rond¶nia
ID:22 Mi: RR Decriþ??o: Roraima
ID:23 Mi: RS Decriþ??o: Rio Grande do Sul
ID:24 Mi: SC Decriþ??o: Santa Catarina
ID:25 Mi: SE Decriþ??o: Sergipe
ID:26 Mi: SP Decriþ??o: S??o Paulo
ID:27 Mi: TO Decriþ??o: Tocantins
ID:28 Mi: XX Decriþ??o: Fora Do Brasil

How to display the text with special characters like 'ç ú í' tha are
used commonly in latin languages?
-- 
Posted via http://www.ruby-forum.com/.