[swift-users] emoji in source code failed to compile in linux ubuntu
Bee
bee.ography at gmail.com
Fri Dec 4 04:41:45 CST 2015
Here's the screen capture: http://i.imgur.com/0ud0hE4.png
On Fri, Dec 4, 2015 at 1:29 PM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
> Hi Bee,
>
> On Thu, Dec 3, 2015 at 9:00 PM, Bee <bee.ography at gmail.com> wrote:
> >
> > Hi,
> >
> > 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:
> >
> > $ swiftc test.swift
> > test.swift:1:32: error: invalid UTF-8 found in source file
>
> This might be a clue... how did you insert the emoji?
>
> > print("Hello World from Swift! ")
> > test.swift:1:35: error: invalid UTF-8 found in source file
> > print("Hello World from Swift! ")
> > test.swift:1:1: error: 'print' is unavailable: Please wrap your tuple
> argument in parentheses: 'print((...
> > ))'
> > print("Hello World from Swift! ")
> > Swift.print:2:13: note: 'print' has been explicitly marked unavailable
> here
> > public func print<T>(_: T)
> > ^
>
> Could you post the output of:
>
> $ xxd < test.swift
>
> since it looks like mail has mangled the emoji and I'm not seeing it
> in your message.
>
> Dmitri
>
> --
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
>
--
-Bee-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20151204/b8f599c2/attachment.html>
More information about the swift-users
mailing list