Simon --
> > I may be misunderstanding, but I think 'strnative' needs to go away
> > and we need to determine the precise native encoding,
>
> Please don't apply this; I think you are misunderstanding.
> strnative is equivalent to LANG=C. It *is* the precise native
> encoding.
No problem. I wasn't planning on committing it. I was just using it
as an illustration.
I'm going to elaborate a little, because I'm not sure I made clear
what was bugging me. I'll just beg a little lattitude. I'll also
go re-read the parrot string docs to see if that helps. But, in
the mean time...
Its still likely that I'm misunderstanding the intent, but I think
that a .pbc file created by me with LANG=C is not necessarily going
to generate string constants that have the same meaning when you go
to run it on your platform of choice, which sounds bad to me.
I guess I'm having trouble getting my brain around this being one
piece of information. I think its two:
1. The interpreter's native string encoding, being whatever was
convenient for the interpreter writer. In our case, we're
writing the interpreter in C, and C has an idea of what its
character encoding is, and hopefully we'll at some point
be able to determine that it is ISO8859-1 or whatever.
NOTE: I'm assuming that since string encodings are part of
the abstract definition of Parrot, and that nothing says
all implementations of Parrot must be in C, we have to avoid
C-isms in the Parrot *definition* even though we are going
to turn right around and use C-isms in the *implementation*.
2. The encoding for the chunk-o-memory the interpreter is about
to turn into a STRING, having found said chunk in the packfile's
const_table.
I'm not denying that there *is* a native encoding, but I think
*calling* it "native" vs. calling it by its actual name (such as
"iso8859-1", or whatever is detected/configured), isn't helpful
when someone on another platform goes to read your .pbc file.
And, I think a STRING should never say "I'm a native string". It
should say "I'm an ISO8859-1 string", and the interpreter should
say "aha! that's my native encoding; cool." or "ok. That's not my
native encoding; I'd better go load up support for it...".
Regards,
-- Gregor
_____________________________________________________________________
/ perl -e 'srand(-2091643526); print chr rand 90 for (0..4)' \
Gregor N. Purdy [EMAIL PROTECTED]
Focus Research, Inc. http://www.focusresearch.com/
8080 Beckett Center Drive #203 513-860-3570 vox
West Chester, OH 45069 513-860-3579 fax
\_____________________________________________________________________/