Created
February 10, 2014 19:44
-
-
Save nathanharper/8922797 to your computer and use it in GitHub Desktop.
Convert STDIN to equivalent output in Unicode code points. If the input was a Scala program, you can run the output! YAY!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (ln <- io.Source.stdin.getLines) | |
println(ln map {c => "\\u%04X".format(c.toInt)} mkString) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OMG the Unicode version AHAHAHA I'M SO CLEVER
\u0066\u006F\u0072\u0020\u0028\u006C\u006E\u0020\u003C\u002D\u0020\u0069\u006F\u002E\u0053\u006F\u0075\u0072\u0063\u0065\u002E\u0073\u0074\u0064\u0069\u006E\u002E\u0067\u0065\u0074\u004C\u0069\u006E\u0065\u0073\u0029
\u0020\u0020\u0070\u0072\u0069\u006E\u0074\u006C\u006E\u0028\u006C\u006E\u0020\u006D\u0061\u0070\u0020\u007B\u0063\u0020\u003D\u003E\u0020\u0022\u005C\u005C\u0075\u0025\u0030\u0034\u0058\u0022\u002E\u0066\u006F\u0072\u006D\u0061\u0074\u0028\u0063\u002E\u0074\u006F\u0049\u006E\u0074\u0029\u007D\u0020\u006D\u006B\u0053\u0074\u0072\u0069\u006E\u0067\u0029