Problems printing each digit of a number in erlang

I am trying to make a program that will read in a number, and then output each digit of that number in the list. However, most things look great until I try with numbers 8 and 9. The program displays \b \t.
if the input number contains 8 or 9, and at the same time there are other numbers, for example 283, it will print normally. Otherwise, if there is only 8 or 9, for example 8, 99then this will give me this binary representation of 8 and 9 (if I remember correctly).
My program is as follows:
digitize(0)-> 0;
digitize(N) when N < 10 -> [N];
digitize(N) when N >= 10 -> digitize(N div 10)++[N rem 10].

+3
source share
2 answers

, , ASCII- ( , Erlang, ). , [8, 8] (,) , shell:strings(false) ( shell:strings(true), ).

+3

Erlang , . , , . , , . \b - , \t - , ASCII 8 9

. :

+3
source

Source: https://habr.com/ru/post/1608157/


All Articles