Issue occurs the first time I type any expression.
# perl6
To exit type 'exit' or '^D'
> []
Internal error: unhandled encoding
in method CALL-ME at ... (NativeCall) line 587
in method readline at ... (Readline) line 1391
> []
[]
Curiously, issue does not occur the first time if I run it really soon after the REPL starts, but the next time it will trigger.
See this asciinema
Relevant lines
571 method CALL-ME(|args) {
572 self.create-optimized-call() unless
573 $!is-clone # Clones and original would share the invokespec but not the $!do attribute
574 or $!any-optionals # the compiled code doesn't support optional parameters yet
575 or $*W; # Avoid issues with compiling specialized version during BEGIN time
576 self!setup();
577
578 my Mu $args := nqp::getattr(nqp::decont(args), Capture, '@!list');
579 if nqp::elems($args) != $!arity {
580 X::TypeCheck::Argument.new(
581 :objname($.name),
582 :arguments(args.list.map(*.^name))
583 :signature(try $r.signature.gist),
584 ).throw
585 }
586
587 nqp::nativecall($!rettype, self, $args) # <----------
588 }
1387 sub readline( Str )
1388 is export
1389 returns Str
1390 is native( LIB ) { * }
1391 method readline( Str $prompt ) # <----------
1392 returns Str {
1393 readline( $prompt ) }
Upon doing a little digging, this error seems to be coming from within the depths of MoarVM, specifically nativecall.c