UTF-8

Erlang

The main thing you should know about Erlang unicode is that 1> unicode:characters_to_binary("UniText") == <<"UniText"/utf8>>. I.e. in N2O DSL you should use: 2> io:format("~tp",[ #button{body= <<"Unicode Name"/utf8>>} ]).

JavaScript

Whenever you want to send to server the value from DOM element you should use utf8_toByteArray. > utf_toByteArray(document.getElementById('phone').value);

However we created shortcut for that purposes which knows about radio, fieldset and other types of DOM nodes. So you should use just:

> querySource('phone');

querySource JavaScript function ships in nitrogen.js which is part of N2O JavaScript library. Whenever you get unicode data from server you should prepare it before place in DOM with utf8_decode:

> console.log(utf8_decode(receivedMessage));