(whoops)

I just added octal and hex escapes to my local copy of the Tcl parser. I was 
working on unicode when I noticed that not all of the transcodes are done yet.

This works:

 $S0 = unicode:""
 $S1 = chr 0x30b3
 $S0 .= $S1
 print $S0
 print "\n"

This does not:

 $S0 = ascii:""
 $S1 = chr 0x30b3
 $S0 .= $S1

It fails with:

Cross-type string appending (fixed_8/ascii) (utf8/unicode) unsupported

Similarly, the default iso encoding doesn't allow conversion to unicode either.

FYI, the charset:"string constant" documentation in imcc doesn't mention 
"unicode", though unicode appears to be a valid choice.

Now, to work around the transcoding issue, I thought I'd just keep all my strings as unicode... but I can't do this, as part of my parsing involves adding single characters based on their value. e.g.: if I have something like

puts \11WHEE

Then I have to generate a string like this:

$S1 = chr $I1

... and that string defaults to iso, which can't be transcoded to unicode.

So, anyone want to implement iso to unicode translation? (it looks like there 
*is* an implementation for ASCII, but as I noted above, it generates an 
exception).


Regards.

Reply via email to