esl / ice

Apache License 2.0
2 stars 4 forks source link

Support Unicode characters in ICE shell #77

Closed lucafavatella closed 8 years ago

lucafavatella commented 8 years ago

Please refer to commit message for details

lucafavatella commented 8 years ago

@horvand Would you mind having a look at this?

horvand commented 8 years ago

@lucafavatella Is this enough for unicode support? ICE shell just does an io:get_line() not setting any options beforehand on the terminal.

lucafavatella commented 8 years ago

Looks like it is not enough:

$ bin/icesh
ICE> ↓(↑{} (1 + 46))
escript: exception error: no match of right hand side value
                 {syntax_error,1,"illegal characters ","\"""}
  in function  ice_shell:parse_line/1 (src/ice_shell.erl, line 168)
  in call from ice_shell:check_def/1 (src/ice_shell.erl, line 164)
  in call from ice_shell:do_line/2 (src/ice_shell.erl, line 92)
  in call from ice_shell:loop/1 (src/ice_shell.erl, line 78)
  in call from ice_shell:main/1 (src/ice_shell.erl, line 20)
  in call from escript:run/2 (escript.erl, line 752)
  in call from escript:start/1 (escript.erl, line 276)
  in call from init:start_it/1

Exit code 127.

lucafavatella commented 8 years ago

@horvand Seems ok now.