From: "Iñaki Baz Castillo" Date: 2009-04-04T03:33:49+09:00 Subject: Re: Problem with String encoding when modifying it in C method El Viernes 03 Abril 2009, Andre Nathan escribió: > On Sat, 2009-04-04 at 01:39 +0900, Iñaki Baz Castillo wrote: > > Could I invoke the C "force_encoding()" function from the C code > > before returning the modified string? How to invoke it? > > You can call it as (untested): > > rb_funcall(str, rb_intern("force_encoding"), 1, rb_str_new2("utf-8")); > > I'm not sure how to make your multi-capitalize method do the right > thing, but maybe reading the source of rb_str_capitalize_bang in > string.c helps. Thanks a lot, I will check it. -- Iñaki Baz Castillo