[erlang-questions] unicode: what about printing terms?

Patrik Nyblom pan@REDACTED
Mon Oct 22 15:00:11 CEST 2012


On 10/19/2012 07:27 PM, Vlad Dumitrescu wrote:
> Hi!
Hi Vlad!
>
> I'm starting a new thread so as not to mix everything up in the same ones.
>
> How is printing going to work when atoms/variables can be unicode? Is
> there going to be ~tp and ~tw, to follow the style from strings? When
> unicode becomes the default, will ~tw disappear or remain?
Well, the ~ts is because the same data can be interpreted in different 
ways, the interpretation of a binary can not be done depending on it's 
content alone (except if you resort to guessing, which of course 
"mostly" works). Hence the difference between ~ts and ~s. In the atom 
case there is no need for interpretation. Atoms are Unicode in R18, 
period. So there's no need for a t modifier for atoms. Binaries will 
however be subject to interpretation regardless of the default.
> Or maybe each output stream will get a default encoding and ~w/~p will
> follow that?
>
> best regards,
> Vlad

Cheers,
/Patrik
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list