<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Yes, I think there is a problem in the way that the Unicode is being entered. The unicode sequence for UTF-8 should look like f0 9f 98 83 0a.<div class=""><br class=""></div><div class="">However it looks like the character is being encoded in your file as: ed a0 bd ed b8 80 which I’m not sure where that’s come from. But it does look like the editor that you’re using isn’t converting the unicode to the right value.</div><div class=""><br class=""></div><div class="">In the meantime, you can print out a smiley by entering a unicode escape sequence as follows:</div><div class=""><br class=""></div><div class="">print("Hello \u{1f603}")<br class=""><div class=""><br class=""></div><div class="">Alex</div><div class=""><div style="margin: 0px; font-size: 13px; font-family: Monaco;" class=""><br class=""></div><div><blockquote type="cite" class=""><div class="">On 4 Dec 2015, at 11:56, Bee &lt;<a href="mailto:bee.ography@gmail.com" class="">bee.ography@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Oh, I'm sorry… I also have conversation with another member of the list, but we forget to include the list address on the mail target so our conversation going private.<div class=""><br class=""></div><div class=""><span style="font-size:13px" class="">FYI, I installed swift on my Koding VM (ubuntu 64bit) from&nbsp;</span><a href="http://koding.com/" target="_blank" style="font-size:13px" class="">koding.com</a><span style="font-size:13px" class="">. It has an online code editor. Their editor still has problem handling unicode.</span><br class=""></div><div class=""><span style="font-size:13px" class=""><br class=""></span></div><div class=""><span style="font-size:13px" class="">Hope this will clear all things.</span></div><div class=""><span style="font-size:13px" class=""><br class=""></span></div><div class=""><span style="font-size:13px" class="">Thank you.</span></div><div class=""><span style="font-size:13px" class=""><br class=""></span></div><div class=""><span style="font-size:13px" class=""><br class=""></span></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Fri, Dec 4, 2015 at 5:52 PM, Bee <span dir="ltr" class="">&lt;<a href="mailto:bee.ography@gmail.com" target="_blank" class="">bee.ography@gmail.com</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">Here it is:<div class=""><br class=""></div><div class=""><div class="">$ xxd &lt; test.swift &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="">0000000: 7072 696e 7428 2248 656c 6c6f 2057 6f72 &nbsp;print("Hello Wor</div><div class="">0000010: 6c64 2066 726f 6d20 5377 6966 7421 20ed &nbsp;ld from Swift! .</div><div class="">0000020: a0bd edb8 8020 2229 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;..... ")</div></div><div class=""><br class=""></div><div class="">I've asked Koding dev and they said their editor also has problem handling unicode. They believe the problem is with the editor, not swift. They suggest to prevent using unicode directly inside the code, and use the unicode code instead. So, I think the problem has been cleared, although the ideal solution is currently being worked on.</div><div class=""><br class=""></div><div class="">Thank you.</div><div class=""><br class=""></div><div class="gmail_extra"><div class=""><div class="h5"><br class=""><div class="gmail_quote">On Fri, Dec 4, 2015 at 5:46 PM, Alex Blewitt <span dir="ltr" class="">&lt;<a href="mailto:alex.blewitt@gmail.com" target="_blank" class="">alex.blewitt@gmail.com</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">If you run the XXD command it will print out the hex values, which is the important thing (as opposed to a screenshot which doesn’t have that information). For example, it might be using UTF-16 or some other variation.<div class=""><br class=""></div><div class="">Can you open Terminal and run&nbsp;<div class="gmail_extra"><div class="gmail_quote"><br class=""></div><div class="gmail_quote">xxd &lt; test.swift</div></div><div class=""><br class=""></div><div class="">and then copy/paste the text into a mail response? Then we can figure out what’s wrong.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""></div><div class="">Alex</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class=""><div class=""><div class="">On 4 Dec 2015, at 11:41, Bee &lt;<a href="mailto:bee.ography@gmail.com" target="_blank" class="">bee.ography@gmail.com</a>&gt; wrote:</div><br class=""></div></div><div class=""><div class=""><div class=""><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">Here's the screen capture:&nbsp;<a href="http://i.imgur.com/0ud0hE4.png" target="_blank" class="">http://i.imgur.com/0ud0hE4.png</a><div class=""><br class=""></div></div><div class="gmail_extra" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br class=""><div class="gmail_quote">On Fri, Dec 4, 2015 at 1:29 PM, Dmitri Gribenko<span class="">&nbsp;</span><span dir="ltr" class="">&lt;<a href="mailto:gribozavr@gmail.com" target="_blank" class="">gribozavr@gmail.com</a>&gt;</span><span class="">&nbsp;</span>wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi Bee,<br class=""><span class=""><br class="">On Thu, Dec 3, 2015 at 9:00 PM, Bee &lt;<a href="mailto:bee.ography@gmail.com" target="_blank" class="">bee.ography@gmail.com</a>&gt; wrote:<br class="">&gt;<br class="">&gt; Hi,<br class="">&gt;<br class="">&gt; Just successfully installed Swift on my Linux machine. It went well and a Hello World program compiled successfully. However, when I tried to put an emoji inside of the string, it failed compiling. The error message is:<br class="">&gt;<br class="">&gt; $ swiftc test.swift<br class="">&gt; test.swift:1:32: error: invalid UTF-8 found in source file<br class=""><br class=""></span>This might be a clue... how did you insert the emoji?<br class=""><span class=""><br class="">&gt; print("Hello World from Swift! ")<br class="">&gt; test.swift:1:35: error: invalid UTF-8 found in source file<br class="">&gt; print("Hello World from Swift! ")<br class="">&gt; test.swift:1:1: error: 'print' is unavailable: Please wrap your tuple argument in parentheses: 'print((...<br class="">&gt; ))'<br class="">&gt; print("Hello World from Swift! ")<br class="">&gt; Swift.print:2:13: note: 'print' has been explicitly marked unavailable here<br class="">&gt; public func print&lt;T&gt;(_: T)<br class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;^<br class=""><br class=""></span>Could you post the output of:<br class=""><br class="">$ xxd &lt; test.swift<br class=""><br class="">since it looks like mail has mangled the emoji and I'm not seeing it<br class="">in your message.<br class=""><span class=""><font color="#888888" class=""><br class="">Dmitri<br class=""><br class="">--<br class="">main(i,j){for(i=2;;i++){for(j=2;j&lt;i;j++){if(!(i%j)){j=0;break;}}if<br class="">(j){printf("%d\n",i);}}} /*Dmitri Gribenko &lt;<a href="mailto:gribozavr@gmail.com" target="_blank" class="">gribozavr@gmail.com</a>&gt;*/<br class=""></font></span></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>--<span class="">&nbsp;</span><br class=""><div class=""><div dir="ltr" class=""><div class="">-Bee-<br class=""><br class=""></div></div></div></div></div></div><span class=""><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=4UsVFgIJDmjEl1-2Bp4dkDdfPyHFijFe3gbZsM1qGcraXV0qeR0RkaHKTYxwcpO45BXkSyeNS6efAOa4ZoIHKpoy309cPuySkQnhtfsuNDQ-2Bd3jaafEZnCPNZX7rdqj0yeU-2BYMtvYjpBv5JnmLzb7wwN5OHOFNn-2BKCJ05uEuGmrBeM-2F0UYtQTTm6lWbieSqMvIS8ScHEoDkdFuVILT9REKEvxzDD1jypR1-2BpNDLG-2BM2QY-3D" alt="" width="1" height="1" border="0" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;min-height:1px!important;width:1px!important;border-width:0px!important;margin:0px!important;padding:0px!important" class=""><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important" class=""><span class="">&nbsp;</span>_______________________________________________</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important" class="">swift-users mailing list</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><a href="mailto:swift-users@swift.org" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank" class="">swift-users@swift.org</a><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><a href="https://lists.swift.org/mailman/listinfo/swift-users" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-users</a></span></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div></div></div><span class="HOEnZb"><font color="#888888" class="">-- <br class=""><div class=""><div dir="ltr" class=""><div class="">-Bee-<br class=""><br class=""></div></div></div>
</font></span></div></div>
</blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature"><div dir="ltr" class=""><div class="">-Bee-<br class=""><br class=""></div></div></div>
</div>
</div></blockquote></div><br class=""></div></div></body></html>