From: "Noé Alejandro Castro Sánchez" Date: 2011-01-07T03:39:44+09:00 Subject: From UTF-8 to windows-1252 Hello. I have some data in a file with windows-1252 charset ("special" characters, for example accented words). I use the method encode to post them in a SQLite3 DB: mydata.encode("utf-8") Using SQLiteSpy I can see the data with the right characters. But when I get the data from the DB with my program I want to process them in Windows-1252 again. So, if I use encode with windows-1252 I get an error mydata.encode("windows-1252") compare_synonyms.rb:21:in `encode': "\xC3" from ASCII-8BIT to UTF-8 in conversion from ASCII-8BIT to Windows-1252 (Encoding::UndefinedConversionError) from compare_synonyms.rb:21:in `block (2 levels) in identify_synonyms' Now, if I use codepoints the data are not displayed with the the right characters: mydata.codepoints.to_a.pack("C*") >> acompañar What happen? What can I do? Thanks in advanced. -- Posted via http://www.ruby-forum.com/.