Simon Cozens <[EMAIL PROTECTED]> writes:
>[EMAIL PROTECTED] (Simon Cozens) writes:
>> Can someone give me a few quick examples of creating Encode::XS objects
>> to do simple transcoding, from XS?
>
>I think I expressed myself badly. Perhaps I don't mean "creating" Encode::XS
>objects, but instantiating them.
>
>Let's say I'm in XS, I have an EUC-JP bit of text, and I want to convert it
>to UTF-8. What's the code to do that?


It isn't trivial - what do you want to do when it doesn't convert,
when your target buffer is too small etc.
So what I do in PerlIO::encoding and Tk804 is just call perl 
API via normal PUSHMARK(sp); XPUSHs; call_method() scheme.

Dan gave you that.

Reply via email to