Mark,
> > I did try just looping through skipping each 2nd byte, but I can't
> > seem to spot a method going from the SmallInteger that comes out of
> > the array to a character.
> Is there a more optimized way of doing this?
Hard to say. I would have coded it something like this:
| in out |
out := String writeStream.
in := aByteArray readStream
[ in atEnd ] whileFalse:[
out nextPut:in next asCharacter.
in next.
].
^out contents.
Caveat: I haven't tested this, so it might not work at all, but some variant
on it hopefully will.
You might also be able to create a UnicodeString from the data, and then
send #asString. However, I suspect that UnicodeString follows the (jump on
me if this is unfair) Microsoft practice of unicode==wideCharacter rather
than using slicker encodings. Will it remain that way, or improve and break
your code? It might be best to roll your own.
Have a good one,
Bill
--
Wilhelm K. Schwab, Ph.D.
[hidden email]