From: Pit Capitain Date: 2006-11-17T17:20:20+09:00 Subject: Re: encoding in windows (newby question) Alfonso schrieb: > Sorry, I didn't expressed me correctly. When I said that if I type ñ ó á > é í in the editor I have this result > > ± ¾ ß Ú Ý. I didn't mean that I couldn't see ñ ó á é í in the > edited file. They appear just so: ñ ó á é í. The problem is after > executing the program ("ruby myprogram.rb"). Then the result in the > console will be this: ± ¾ ß Ú Ý. But the saved file has no problem with > representation... Alfonso, this isn't a problem of Ruby, but a problem of the Windows console. To verify, open Notepad and enter your letters, then save the file. In the console, do a "type myfile.txt" (replace with the actual filename). You'll see the same weird characters. The reason is that the Windows console uses a special character encoding. If you want to convert the output of your Ruby programs to the character encoding of the Windows console, look at http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/225185 Regards, Pit