#800: Parrot assumes command line arguments are ASCII
----------------------+-----------------------------------------------------
Reporter: pmichaud | Owner:
Type: bug | Status: new
Priority: major | Milestone:
Component: core | Version: 1.3.0
Severity: medium | Keywords:
Lang: perl6 | Patch:
Platform: |
----------------------+-----------------------------------------------------
Currently Parrot (incorrectly) assumes that all command line arguments are
ASCII:
{{{
$ cat x.pir
.sub 'main'
.param pmc args
$S0 = args[1]
say $S0
$I1 = charset $S0
$S1 = charsetname $I1
say $S1
$I1 = encoding $S0
$S1 = encodingname $I1
say $S1
$I1 = length $S0
say $I1
.end
$ ./parrot x.pir 'say «hello»'
say «hello»
ascii
fixed_8
13
$
}}}
Most would expect the above to be a unicode/utf8 string of length 11.
If Parrot itself cannot be easily changed to accept unicode/utf8 command
line arguments, then it would be nice to have a way to easily convert the
"ascii" strings in args into proper unicode strings. Thus far I've been
unable to find a good way of doing that.
This ticket also relates to Rakudo RT #66364.
Pm
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/800>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets