From: Paul Lutus Date: 2006-11-12T20:30:05+09:00 Subject: Re: Saving an UTF-8 file Miquel Oliete wrote: > Hi All > > I have a problem (newbie problem). > > I don't know how to write a file using utf-8 encoding. Can you help > me. utf-8 is simply 8-bit bytes. Save your data like this: # "data" contain the text data File.open(file_path,"w") { |f| f.write data } utf-8 refers to a convention regarding the content of the bytes and how they are interpreted when read. It isn't something you can specify in a plain-text file. It can be inferred from the format of the bytes, but that is an open interpretation. http://dict.die.net/utf-8/ -- Paul Lutus http://www.arachnoid.com