From: Kevin Howe Date: 2004-09-17T00:39:49+09:00 Subject: Re: Tidy binding using DL > Try the following code, since 'tmbstr' in tidy header files is > considered as 'char *' or 'const char *' Go it. The extern statement was correct, but the buffer string still wasn't big enough to hold the results. The following takes care of it: buffer = String.new # string buffer 8192.times { buffer << ' ' } # must be long enough to hold results Tidylib.tidySaveString(@doc, buffer, buffer.length) output = buffer.strip