473,419 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,419 software developers and data experts.

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 3094
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
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
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
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
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
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
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
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
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
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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
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...
0
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.