Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 63394 - No way to enable unicode entities in HTML::Parser
Summary: No way to enable unicode entities in HTML::Parser
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-09 01:39 UTC by Moshe Kamensky
Modified: 2004-09-22 03:40 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
HTML::Parser ebuild with optional unicode entities support (HTML-Parser-3.36-r1.ebuild,887 bytes, text/plain)
2004-09-09 01:41 UTC, Moshe Kamensky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Moshe Kamensky 2004-09-09 01:39:48 UTC
The perl module HTML::Parser includes support for decoding unicode entities in html (such as „) into the corresponding characters. This should be enabled during the installation. However, the current ebuild automatically answers 'no' to this question.

Attached is a modified ebuild that gives 'yes' if the use flags include unicode.

Reproducible: Always
Steps to Reproduce:
1. Install HTML::Parser
2. Use it to parse a web page that contains unicode entities (for example, http://www.witkacy.hg.pl/witkosmos/kosmopis.html)
3.

Actual Results:  
The text contains the original entities.

Expected Results:  
(Optionally) translate them to unicode characters.
Comment 1 Moshe Kamensky 2004-09-09 01:41:17 UTC
Created attachment 39241 [details]
HTML::Parser ebuild with optional unicode entities support
Comment 2 Michael Cummings (RETIRED) gentoo-dev 2004-09-21 06:17:13 UTC
That is an unfortunate oversight on my part (I could lay blame on the legacy of the ebuild, but that wouldn't be fair). Corrected and noted in 3.36-r1.
Comment 3 Moshe Kamensky 2004-09-22 02:45:49 UTC
The $answer should not be (at least single) quoted in the echo statement.
It appears you like curly braces around variables so it should probably be

echo ${answer} ...

or

echo "${answer}" ...

(Note that there are two of those)
Comment 4 Michael Cummings (RETIRED) gentoo-dev 2004-09-22 03:40:04 UTC
Thanks for the catch; corrected and re-closing.