Skip to content

Instantly share code, notes, and snippets.

@pmichaud
Created May 19, 2009 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmichaud/114189 to your computer and use it in GitHub Desktop.
Save pmichaud/114189 to your computer and use it in GitHub Desktop.
$ cat x.pir
.sub 'main'
.param pmc args
$S0 = args[1]
say $S0
$I0 = encoding $S0
$S1 = encodingname $I0
say $S1
$I0 = length $S0
say $I0
$I0 = charset $S0
$S1 = charsetname $I0
say $S1
.end
$ ./parrot x.pir '«hello ✆»'
«hello ✆»
fixed_8
13
ascii
$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment