[erlang-questions] v17 unicode support

Vlad Dumitrescu vladdu55@REDACTED
Fri Feb 21 23:16:41 CET 2014


On Fri, Feb 21, 2014 at 7:12 PM, Björn-Egil Dahlberg <
wallentin.dahlberg@REDACTED> wrote:

> I don't think that is desired.
> Start erlang with +pc unicode
>
> do a lists:seq(300,10000) ..
>
> // Björn-Egil
>
>
Hmm, I see your point. On the other hand, this is just an artifact for the
lists/strings duality and possibly another reason to make strings a
separate type. If a value is a latin1 string, it will print nicely in the
shell, but if it's utf8 it won't...

regards,
Vlad



>
> 2014-02-21 14:05 GMT+01:00 Vlad Dumitrescu <vladdu55@REDACTED>:
>
>>  Hi!
>>
>> I'm not sure if I misunderstood something or if there is a problem in
>> 17.0-rc1, but starting a shell normally gives
>>
>> Erlang/OTP 17 [RELEASE CANDIDATE 1] [erts-6.0] [smp:4:4]
>> [async-threads:10]
>> Eshell V6.0  (abort with ^G)
>> 1> "Ȇ".
>> [518]
>> 2> erl_scan:string("\"Ȇ\"").
>> {ok,[{string,1,[518]}],1}
>> 3> lists:keyfind(encoding, 1, io:getopts()).
>> {encoding,unicode}
>> 4>  $Ȇ.
>> 518
>>
>> while starting with "+pc unicode" gives the expected (for me) result.
>>
>> Erlang/OTP 17 [RELEASE CANDIDATE 1] [erts-6.0] [smp:4:4]
>> [async-threads:10]
>> Eshell V6.0  (abort with ^G)
>> 1>  "Ȇ".
>> "Ȇ"
>> 2> erl_scan:string("\"Ȇ\"").
>> {ok,[{string,1,"Ȇ"}],1}
>> 3>
>> 3> lists:keyfind(encoding, 1, io:getopts()).
>> {encoding,unicode}
>> 4> $Ȇ.
>> 518
>>
>> Isn't 17.0 supposed to have the unicode support as default even in this
>> context?
>>
>> regards,
>> Vlad
>>
>>
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140221/a61a887e/attachment.htm>


More information about the erlang-questions mailing list