Valid point. I didn't say the solution should be necessary used, I just gave a solution which gives an answer for the raised problem. How it is used, I think Joe doesn't need any other instruction (especially from me). :)<div>
<br></div><div>CGS</div><div><br><br><div class="gmail_quote">On Mon, Jul 30, 2012 at 3:23 PM, Richard Carlsson <span dir="ltr"><<a href="mailto:carlsson.richard@gmail.com" target="_blank">carlsson.richard@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 07/30/2012 03:06 PM, CGS wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Joe,<br>
<br>
You may try unicode module:<br>
<br>
test() -> unicode:characters_to_list("a∞<u></u>b",utf8).<br>
<br>
which will return the desired list [97,8734,98]. As Richard said, the<br>
default is Latin-1 (0-255 integers).<br>
</blockquote>
<br></div>
No! Don't save a source file as UTF8, at least without a way of marking up such files as being special. The problem is that if you do the trick above, you have to ensure that you convert _all_ string literals explicitly this way (at least if they may contain characters outside ASCII). But if you have a character such as ö, or é, in a string and you forget to convert explicitly from UTF8 to single code points, then that "é" will in fact be 2 bytes, while in another module saved in Latin-1, the string "é" that looks the same in your editor will be a single byte, and they won't compare equal. Having modules saved with different encodings is a recipe for disaster (in particular when it comes to future maintenance). Erlang currently only supports Latin-1 in source files; until that is fixed, you should keep your UTF8-data in separate files.<span class="HOEnZb"><font color="#888888"><br>

<br>
   /Richard</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
______________________________<u></u>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/<u></u>listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br></div>