It is if they had kept of the old 9-bit bytes (characters) from DEC-10 days. In those days you also had a real ctrl-key which set the 9th bit. :-)<br><br>Robert<br><br><div><span class="gmail_quote">On 13/02/2008, <b class="gmail_sendername">Alex Arnon</b> <<a href="mailto:alex.arnon@gmail.com">alex.arnon@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">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;"><div><span class="e" id="q_1181205bd183f081_1">
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><br><br><div class="gmail_quote">On Feb 12, 2008 2:59 AM, Hasan Veldstra <<a href="mailto:hasan.veldstra@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">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></span></div><span class="q">_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">erlang-questions@erlang.org</a><br>
<a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>
</span></blockquote></div><br>
<br>_______________________________________________<br>erlang-questions mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br></blockquote></div><br>