Terminal control/Unicode output: Difference between revisions

Content added Content deleted
(Added Kotlin)
(→‎{{header|Kotlin}}: Updated example see https://github.com/dkandalov/rosettacode-kotlin for details)
Line 256: Line 256:
=={{header|Kotlin}}==
=={{header|Kotlin}}==
{{works with|Ubuntu|14.04}}
{{works with|Ubuntu|14.04}}
<lang scala>// version 1.1.1
<lang scala>// version 1.1.2


fun main(args: Array<String>) {
fun main(args: Array<String>) {
val supportsUnicode = "UTF" in System.getenv("LANG").toUpperCase()
val supportsUnicode = "UTF" in System.getenv("LANG").toUpperCase()
if (supportsUnicode)
if (supportsUnicode)
println("This terminal supports unicode and U+25b3 is : \u25b3")
println("This terminal supports unicode and U+25b3 is : \u25b3")
else
else
println("This terminal does not support unicode")
println("This terminal does not support unicode")
}</lang>
}</lang>