Re: xml preformated text & db2html != gnome-db2html
- From: Naba Kumar <kh_naba yahoo com>
- To: Gediminas Paulauskas <menesis delfi lt>
- Cc: gnome-devel-list gnome org
- Subject: Re: xml preformated text & db2html != gnome-db2html
- Date: Sun, 06 May 2001 11:26:54 +0530
Gediminas Paulauskas wrote:
>
> Buvo Pn, 2001-05-04 09:42-0400, kai Havoc Pennington rašė:
> > > 1) How can I put preformated text (that may contain "</>" etc)
> > > without confusing the xml parser? Last time I tried, it was
> > > producing errors and core dumped. May be I'm missing something
> > > here, but I just couldn't make it.
> >
> > You just escape the text, along these lines:
> >
> > static void
> > append_escaped_text (GString *str,
> > const gchar *text,
> > gint length)
> > {
> > const gchar *p;
> > const gchar *end;
> >
> > p = text;
> > end = text + length;
> >
> > while (p != end)
> > {
> > const gchar *next;
> > next = g_utf8_next_char (p);
> >
> > switch (*p)
> > {
> > case '&':
> > g_string_append (str, "&");
> > break;
>
> I have seen this code today in xmlEncodeEntities function from
> gnome-xml/entities.c
>
> It encodes not only & < > but > 0x7f characters also. You may not like
> this.
>
Does these chars have any significance, especially with i18n issues?
Though I don't really need those chars, I would like to make sure
that the application, I am working on, works with some of the general
issues, such as i18n.
--
Regards,
-Naba
-------------------------------------------------------------
As the trials of life continue to take their toll, remember that there
is always a future in Computer Maintenance.
-- National Lampoon, "Deteriorata"
-------------------------------------------------------------
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]