a name="convertappendix"></a>H. Code for Encoding Conversion Example</h2></div></div><div></div></div><p>
      </p><pre class="programlisting">
#include &lt;string.h&gt;
#include &lt;libxml/parser.h&gt;


unsigned char*
convert (unsigned char *in, char *encoding)
{
	unsigned char *out;
        int ret,size,out_size,temp;
        xmlCharEncodingHandlerPtr handler;

        size = (int)strlen(in)+1;
        out_size = size*2-1;
        out = malloc((size_t)out_size);

        if (out) {
                hand