Discussion:
C++ HTMl Encoding/Decoding Library
(too old to reply)
t***@gmail.com
2007-12-04 01:11:13 UTC
Permalink
Hi,

I've been looking around for a library to encode/decode HTML entities
similar to the HTML::Entities that can be used with Perl.

i.e. "& amp ;" should be converted to "&" and vice versa (although the
reverse direction isnt that important"

I suppose I can write up a small class to do this myself, but I was
wondering if such a library exists.

Thx !

Tushar
Rahul
2007-12-04 03:08:23 UTC
Permalink
Post by t***@gmail.com
Hi,
I've been looking around for a library to encode/decode HTML entities
similar to the HTML::Entities that can be used with Perl.
i.e. "& amp ;" should be converted to "&" and vice versa (although the
reverse direction isnt that important"
I suppose I can write up a small class to do this myself, but I was
wondering if such a library exists.
Thx !
Tushar
Could consider parser tools like lex, yacc, bison for decoding...
BobR
2007-12-04 20:36:34 UTC
Permalink
Post by t***@gmail.com
Hi,
I've been looking around for a library to encode/decode HTML entities
similar to the HTML::Entities that can be used with Perl.
i.e. "& amp ;" should be converted to "&" and vice versa (although the
reverse direction isnt that important"
I suppose I can write up a small class to do this myself, but I was
wondering if such a library exists.
Thx !
Tushar
wxWidgets has some HTML classes. Maybe take a look at their code.
wxWidgets URL: http://www.wxwidgets.org
--
Bob R
POVrookie
t***@gmail.com
2007-12-05 00:09:12 UTC
Permalink
Thx for the replies everyone. I had a look at the Firefox code and
found what I wanted, sort of anyways. What I'm looking for now is
this :

Given an HTML sequence like " I have the corresponding unicode
character value (In this case, 34). How can I display this in C/C++ ?
Doing something like printf("\u0034") gives me an error message saying
"\u0016 is not a valid universal character"
t***@gmail.com
2007-12-05 00:11:20 UTC
Permalink
Post by t***@gmail.com
Thx for the replies everyone. I had a look at the Firefox code and
found what I wanted, sort of anyways. What I'm looking for now is
Given an HTML sequence like " I have the corresponding unicode
character value (In this case, 34). How can I display this in C/C++ ?
Doing something like printf("\u0034") gives me an error message saying
"\u0016 is not a valid universal character"
Errata: I do a printf("\u0012"), and the error message I get is
"\u0012 is not a valid universal character"
t***@gmail.com
2007-12-05 00:12:12 UTC
Permalink
Post by t***@gmail.com
Thx for the replies everyone. I had a look at the Firefox code and
found what I wanted, sort of anyways. What I'm looking for now is
Given an HTML sequence like " I have the corresponding unicode
character value (In this case, 34). How can I display this in C/C++ ?
Doing something like printf("\u0034") gives me an error message saying
"\u0016 is not a valid universal character"
Errata: I do a printf("\u0012"), and the error message I get is
"\u0012 is not a valid universal character"

Loading...