From: Joe Armstrong <erl...@gmail.com>
Date: Mon, 30 Jul 2012 14:35:50 +0200
Local: Mon, Jul 30 2012 8:35 am
Subject: [erlang-questions] unicode in string literals
What is a literal string in Erlang? Originally it was a list of
integers, each integer being a single character code - this made strings very easy to work with The code test() -> "a∞b". Compiles to code which returns the list This is very inconvenient. I had expected it to return Is this a bug or a horrible misfeature? So how can I make a string with the three characters 'a' 'infinity' 'b' test() -> "a\x{221e}b" is ugly test() -> <<"a∞b"/utf8>> seems to be a bug test() -> [$a,8734,$b] is ugly /Joe You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||