Ticket #800 (new bug)
Parrot assumes command line arguments are ASCII
Reported by: | pmichaud | Owned by: | chromatic |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | core | Version: | 1.3.0 |
Severity: | medium | Keywords: | |
Cc: | whiteknight, plobsing, nwellnhof | Language: | |
Patch status: | Platform: |
Description
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
Attachments
Change History
Note: See
TracTickets for help on using
tickets.