On 2007.09.05, Janine Sisk <[EMAIL PROTECTED]> wrote:
> I'm working with strings encoded in big5 and gb2312 (traditional and
> simplified Chinese, respectively). I'm exec'ing out to an Java
> program that translates from one to the other. [...]
Is that Java program doing anything else to the data? If you're just
using Java to transcode Tcl strings, you're really hurting yourself for
no reason:
set big5string [encoding convertto big5 $gb2312string]
set gb2312string [encoding convertto gb2312 $big5string]
Tcl's encoding support is probably one of its strenghts as a scripting
language.
> I can't, for example, grab the return value of the command directly
> from the exec; if I do, it's mangled.
I don't think you can tell [exec] what encoding the I/O will be.
Perhaps you could/should see if there's a TIP for [exec -encoding $name
$command] already ...
-- Dossy
--
Dossy Shiobara | [EMAIL PROTECTED] | http://dossy.org/
Panoptic Computer Network | http://panoptic.com/
"He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on." (p. 70)
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]>
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject:
field of your email blank.