From: pere.noel@... (=?ISO-8859-1?Q?Une_b=E9vue?=) Date: 2005-12-27T09:12:53+09:00 Subject: writing to a file converting it needs a thread ? i have a small script building an xml string and, afterwards, i need to convert the string. basically i do : xml="" album_list.each do |k,l| xml=xml+"\n" end tmpFile.puts xml system("iconv -c -s -f MACROMAN -t UTF-8 #{tmpName} > #{xmlDir}/#{xmlName}") and the resulting conversion lacks of one half a line to 26 lines, depending the number of lines (some how randomly)) if after having done that, i launch iconv from command line by : iconv -c -s -f MACROMAN -t UTF-8 /tmp/AddressBook-MACROMAN.xml > AddressBook.xml ("same" command as system("...")) i get all the 156 lines ??? does than means system("iconv -c ...") is started within the ruby script before the end of "tmpFile.puts xml" in which case i'd have to sync writing by puts and reading by iconv ? if this is true, how to do that ? -- une b�vue