From: Gyoung-Yoon Noh Date: 2005-11-06T00:46:08+09:00 Subject: Re: Problem in writing ruby extension. On 11/5/05, ts wrote: > >>>>> "G" == Gyoung-Yoon Noh writes: > > G> Any comment will be appreciated. > > Can you test the value of len in rbhic_commit_string() ? > > wcstombs() can return -1 and in this case > > cbuf[len] = '\0'; > > can do something strange. > > > Guy Decoux > > Thanks for comment. You're right. That statement is unnecessary, and dangerous. I've removed that, but still got the same results. Anyway, it seems that wcstombs(3) does not fill 'cbuf', at least from command-line. But why on IRB or on ruby debugger, it could be filled with multibyte string properly? -- http://nohmad.sub-port.net