My guess would be that 332 is not a valid value for a byte :)<br><br><div class="gmail_quote">2008/2/12 Dustin Whitney <<a href="mailto:dustin.whitney@gmail.com">dustin.whitney@gmail.com</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Yeah, that worked thanks!  I had tried what you did, but it did not
work with the UTF-32 data.  Do you know why?  And how do you suppose my
data was turned into UTF-32.  I got the data originally from an HTTP
GET request that returned a UTF-8 encoded XML file.  The file its self
says it's UTF-8, and the header tuple said the document was using the
UTF-8 charset.  Does Erlang convert the data automatically?<div>
<br></div><div>Thanks!</div><font color="#888888"><font color="#888888">-Dustin</font></font><div><div></div><div class="Wj3C7c"><br><br><div class="gmail_quote">On Feb 12, 2008 2:59 AM, Hasan Veldstra <<a href="mailto:hasan.veldstra@gmail.com" target="_blank">hasan.veldstra@gmail.com</a>> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><br>> How can I write [332,116,97,44,32,71,117,110,109,97] to a file so<br>
> that when I open it up it looks like "Ôta, Gunma"?<br><br><br></div>-module(ftest).<br>-export([run/0]).<br><br>run() -><br>     Data = [197,140,116,97,44,32,71,117,110,109,97],<br>     file:write_file("ftest.txt", list_to_binary(Data)).<br>

<br><br>Text is just numbers when stored to disk.<br><br>By the way, the list of numbers you originally posted is "Ôta, Gunma"<br>encoded in UTF-32, not UTF-8. It's in UTF-8 in my example.<br><br>Hope this helps.</blockquote>

</div><br>
</div></div><br>_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br><a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br>