C++ HTMl Encoding/Decoding Library

T

tushar.saxena

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
 
R

Rahul

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...
 
B

BobR

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
 
T

tushar.saxena

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

tushar.saxena

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"

Errata: I do a printf("\u0012"), and the error message I get is
"\u0012 is not a valid universal character"
 
T

tushar.saxena

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"

Errata: I do a printf("\u0012"), and the error message I get is
"\u0012 is not a valid universal character"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top