rb_set_kcode equivalent for 1.9.x

Discussion in 'Ruby' started by Dan Rathbun, Aug 11, 2010.

  1. Dan Rathbun

    Dan Rathbun Guest

    The C function rb_set_kcode was defined in the 1.8.x branch.

    In the 1.9.x branch, the encoding was overhauled, and all the methods
    were renamed (without aliasing, it seems.)

    I use an application than loads the Ruby interpreter (as a scripting
    engine.) It loads 1.8.x fine, but cannot load 1.9.x ("rb_set_kcode entry
    point not found" or similar error occurs.)

    The application calls rb_set_kcode to set encoding to UTF8.

    I'd like to inform the software company of the new call for 1.9.x, can
    anyone tell me what the correct call would be to set encoding to UTF8 in
    1.9.x ??

    P.S. - I need the C function call not the Ruby call, not the Ruby
    command line argument -K.

    It's something like rb_enc_somefunction_name( arg )
    Dan Rathbun, Aug 11, 2010
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.