<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial">This is so cool. Thanks!<br><br><div style="position:relative;zoom:1">--<br>Hao<div style="clear:both"></div></div><div id="divNeteaseMailCard"></div><br>ÔÚ 2015-07-27 03:37:34£¬"Jesper Louis Andersen" <jesper.louis.andersen@gmail.com> дµÀ£º<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jul 26, 2015 at 9:30 PM, Íõê» <span dir="ltr"><<a href="mailto:jusfeel@163.com" target="_blank">jusfeel@163.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I am using a web framework(Chicagoboss). I posted the data into Erlang in Chinese in utf8 encoded string from a web form. It is read by Erlang as [232,191,153]. This is just one single Chinese character. But erlang read it as [232,191,153]. So I want to consume via ajax later on on the client side. </blockquote></div><br>Ah, you have three bytes, 232, 192, 153 in utf8 representation and want to convert those into a unicode codepoint. Here I have a binary with a bit of other utf8 characters in it (since ASCII and utf8 overlaps):</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">9> B = <<232, 191, 153, $h, $e, $l, $l, $o>>.</div><div class="gmail_extra"><<232,191,153,104,101,108,108,111>></div><div class="gmail_extra">10> [CP || <<CP/utf8>> <= B].</div><div class="gmail_extra">[36825,104,101,108,108,111]</div><div><br></div><br clear="all"><div><br></div>-- <br><div class="gmail_signature">J.</div>
</div></div>
</blockquote></div>