[swift-users] emoji in source code failed to compile in linux ubuntu

Bee bee.ography at gmail.com
Thu Dec 3 23:00:32 CST 2015


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
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)
            ^
$

I put the emoji after the exclamation marks of the string.

Any hints?

Thank you.

-- 
-Bee-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20151204/528c4b6a/attachment.html>


More information about the swift-users mailing list