From: Aaron Patterson Date: 2009-02-23T14:58:46+09:00 Subject: [ruby-core:22349] Re: String encoding in the C api On Mon, Feb 23, 2009 at 02:55:24PM +0900, Nobuyoshi Nakada wrote: > Hi, > > At Mon, 23 Feb 2009 14:52:26 +0900, > Aaron Patterson wrote in [ruby-core:22346]: > > Is there an easy way to set my string enoding from the C api? > > > > rb_str_new2() gives me #, but I know that the > > string is UTF-8. > > In include/ruby/encoding.h: > VALUE rb_enc_str_new(const char*, long, rb_encoding*); Rock and roll. ������������������������������������ Thanks a bunch! -- Aaron Patterson http://tenderlovemaking.com/