rsvg_desc_handler_characters (RsvgSaxHandler * self, const char *ch, int len)
{
    RsvgSaxHandlerDesc *z = (RsvgSaxHandlerDesc *) self;
    RsvgHandle *ctx = z->ctx;

    /* This isn't quite the correct behavior - in theory, any graphics
       element may contain a title or desc element */

    if (!ch || !len)
        return;

    if (!g_utf8_validate ((char *) ch, len, NULL)) {
        char *utf8;
        utf8 = rsvg_make_valid_utf8 ((char *) ch, len);
        g_string_append (ctx->priv->desc, utf8);
        g_free (utf8);
    } else {
        g_string_append_len (ctx->priv->desc, (char *) ch, len);
    }
}
rsvg_desc_handler_characters (RsvgSaxHandler * self, const char *ch, int len)
{
    RsvgSaxHandlerDesc *z = (RsvgSaxHandlerDesc *) self;
    RsvgHandle *ctx = z->ctx;

     

    if (!ch || !len)
        return;

    if (!g_utf8_validate ((char *) ch, len, NULL)) {
        char *utf8;
        utf8 = rsvg_make_valid_utf8 ((char *) ch, len);
        g_string_append (ctx->priv->desc, utf8);
        g_free (utf8);
    } else {
        g_string_append_len (ctx->priv->desc, (char *) ch, len);
    }
}