473,503 Members | 12,159 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Where to look for source of HTML::Parser

Hello,

I am trying to pinpoint an apparent bug in HTML::Parser. The
encoding of the text seems to change incorrectly if the locale isn't
set properly.

However Parser.pm in the directory
(/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/HTML/)
doesn't seem to contain the "real" parsing statements.

Could you tell me where to look for the "real" code.

Thank You
Himanshu.
Jul 19 '05 #1
3 3102
Himanshu Garg wrote:
I am trying to pinpoint an apparent bug in HTML::Parser. The
encoding of the text seems to change incorrectly if the locale
isn't set properly.

However Parser.pm in the directory
(/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/HTML/)
doesn't seem to contain the "real" parsing statements.

Could you tell me where to look for the "real" code.


HTML::Parser requires HTML::Entities, and it's probably the latter you
want to study.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

Jul 19 '05 #2
Gunnar Hjalmarsson <no*****@gunnar.cc> wrote in message news:<Fw********************@newsb.telia.net>...
Himanshu Garg wrote:
I am trying to pinpoint an apparent bug in HTML::Parser. The
encoding of the text seems to change incorrectly if the locale
isn't set properly.

However Parser.pm in the directory
(/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/HTML/)
doesn't seem to contain the "real" parsing statements.

Could you tell me where to look for the "real" code.


HTML::Parser requires HTML::Entities, and it's probably the latter you
want to study.

No it is not the one I am looking for. HTML/Entities.pm merely encodes
and decodes entities.

I am looking for where other things like tags, their attributes etc
are handled and I do not find them in either of these.

Nevertheless, I thank you very much for your reply.

Thank You
++imanshu.
Jul 19 '05 #3
Himanshu Garg wrote:
Hello,

I am trying to pinpoint an apparent bug in HTML::Parser. The
encoding of the text seems to change incorrectly if the locale isn't
set properly.

However Parser.pm in the directory
(/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/HTML/)
doesn't seem to contain the "real" parsing statements.

Could you tell me where to look for the "real" code.


Take a look at the beginning of the perl module.
/usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris/HTML/Parser.pm
require DynaLoader;
@ISA=qw(DynaLoader);
HTML::Parser->bootstrap($VERSION);
That means Parser.pm uses Parser.so (and Parser.bs).

/usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris/auto/HTML/Parser/.packlist
/usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris/auto/HTML/Parser/Parser.bs
/usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris/auto/HTML/Parser/Parser.so

The *.so files are built from *.h and *.c files.
..cpan/build/HTML-Parser-3.34/hctype.h
..cpan/build/HTML-Parser-3.34/hparser.c
..cpan/build/HTML-Parser-3.34/hparser.h
..cpan/build/HTML-Parser-3.34/Parser.bs
..cpan/build/HTML-Parser-3.34/Parser.c
..cpan/build/HTML-Parser-3.34/Parser.o
..cpan/build/HTML-Parser-3.34/Parser.pm
..cpan/build/HTML-Parser-3.34/Parser.xs
..cpan/build/HTML-Parser-3.34/pfunc.h

--
I love my TiVo - http://www.inwap.com/u/joe/tivo/
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
11905
by: Mitchua | last post by:
I am trying to use HTML::Parser to parse an HTML file, remove all HTML tags (including comments, etc.), replace all ENTITIES (e.g. &amp), and put the result into a variable as a string. I figure...
2
5880
by: Divya Rao | last post by:
Hi, I need to parse a HTML file, and extract all the text in it (not the images, tags). I cannot figure out how to do it. I have the HTML file saved in my local directory. I need to have the text...
6
2813
by: wilk | last post by:
Is anybody know here any class in .NET that would help me to parse html in C# ? Or maybe you can even tell me how to do it? -- -- -------------------------------------- Pozdrawiam WILK...
2
2540
by: Craig Kenisston | last post by:
Hi, Could someone recommend any decedent html parser ? All what I need to do is to extract the links from a given page. I've found several tools in codeproject but all seems to be a bit...
0
1224
by: icoba | last post by:
Hi, I am parsing html documents using the html parser from libxml2, and if the encoding is included in the document it works perfectly but if it is not, I think it does not work well (probably...
2
2647
by: David Virgil Hobbs | last post by:
Loading text strings containing HTML code into an HTML parser in a Javascript/Jscript I would like to know, how one would go about loading a text string containing HTML code, so as to be able to...
1
1485
by: atulskulkarni | last post by:
Hello All, I am trying to extract text from the HTML using the following code, use strict; use HTML::Parser 3.00 (); my %inside; my $p;
1
1829
by: Aaron Gray | last post by:
I am looking for an HTML parser that will parser malformed HTML Netscape bookmarks.html files. Ideally it will work with callbacks. Many thanks in advance, Aaron
5
7302
by: Johannes Bauer | last post by:
Hello group, I'm trying to use a htmllib.HTMLParser derivate class to parse a website which I fetched via httplib.HTTPConnection().request().getresponse().read(). Now the problem is: As soon as...
0
7264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6975
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5562
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1495
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
371
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.