Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Pod-ProjectDocs CPAN distribution.

Report information
The Basics
Id: 25123
Status: resolved
Priority: 0/
Queue: Pod-ProjectDocs

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.31
Fixed in: (no value)



Subject: Problems with highbit characters
Pod::Projectdocs does not convert non-ascii characters correctly. The module handles symbolic entities correctly (e.g. E<auml>). The module does not handle numeric entities correctly (e.g. E<0x20ac>). This will be converted to &0x20ac; but should be &#0x20ac; (note the missing #). Also, literal iso-8859-1 characters above 160 are not handled correctly. They are copied as-is to the generated XHTML source which is wrong, as XHTML expects utf-8 if not stated otherwise. Pod::Projectdocs also does not handle the new "=encoding" directive to switch to another encoding for the Pod document. Compare http://search.cpan.org/~srezic/Tk-Pod-0.9932/Pod/Text.pm how highbit characters should look like (the german umlauts at the bottom of the page) and the output as generated by pod2projectdocs in the attachment. Regards, Slaven
Subject: Text.pm.html
Tk::Pod::Text

MyProject's Libraries

Description manuals and libraries
MyProject's Libraries > Perl Modules > Pod-Text

Index


NAME

Tk::Pod::Text - Pod browser widget

SYNOPSIS

    use Tk::Pod::Text;

    $pod = $parent->Scrolled("PodText",
			     -file	 => $file,
			     -scrollbars => "osoe",
		            );

    $file = $pod->cget('-path');   # ?? the name path is confusing :-(

DESCRIPTION

Tk::Pod::Text is a readonly text widget that can display Pod documentation.

OPTIONS

-file

The named (pod) file to be displayed.

-path

Return the expanded path of the currently displayed Pod. Useable only with the cget method.

-poddone

A callback to be called if parsing and displaying of the Pod is done.

-wrap

Set the wrap mode. Default is word.

-scrollbars

The position of the scrollbars, see also Tk::Scrolled. By default, the vertical scrollbar is on the right on Windows systems and on the left on X11 systems.

Note that it is not necessary and usually will do the wrong thing if you put a Tk::Pod::Text widget into a Scrolled component.

Other options are propagated to the embedded Tk::More widget.

ENVIRONMENT

TKPODDEBUG

Turn debugging mode on if set to a true value.

TKPODPRINT

Use the specified program for printing the current pod. If the string contains a %s, then filename substitution is used, otherwise the filename of the Pod document is appended to the value of TKPODPRINT. Here is a silly example to send the Pod to a web browser:

    env TKPODPRINT="pod2html %s > %s.html; galeon %s.html" tkpod ...

TKPODEDITOR

Use the specified program for editing the current pod. If TKPODEDITOR is not specified then the first defined value of XEDITOR, VISUAL, or EDITOR is used on Unix. As a last fallback, ptked or vi are used, depending on platform and existance of a terminal.

TKPODMANVIEWER

Use the specified program as the manpage viewer. The manpage viewer should accept a manpage URL (man://manpage(section)). Alternatively the special viewer "internal" may be used. As fallback, the default GNOME and/or KDE manpage viewer will be called.

SEE ALSO

Tk::More Tk::Pod Tk::Pod::SimpleBridge Tk::Pod::Styles Tk::Pod::Search Tk::Pod::Search_db perlpod tkpod perlindex

KNOWN BUGS

See TODO file of Tk-Pod distribution

POD TO VERIFY PodText WIDGET

For PodText see Tk::Pod::Text.

A fixed width font.

Text in slant italics.

A <=for> paragraph is hidden between here

and there.

A file: /usr/local/bin/perl. A variable $a without markup.

boofar is in S<>.

German umlauts:

auml: ä �,
Auml: Ä �,
ouml: ö �,
Ouml: Ö �,
Uuml: ü �,
Uuml: Ü �,
sz: ß �.

Unicode outside Latin1 range: &0x20ac; (euro sign).

Pod with umlaut: ExtUtils::MakeMaker.

Details: perlpod or perl, perlfunc.

External links: http://www.cpan.org (URL), perl(1) (man page).

Here some code in a as is paragraph

    use Tk;
    my $mw = MainWindow->new;
    ...
    MainLoop
    __END__




Fonts: fixed, bold, italics, normal, or file /path/to/a/file

Mixed Fonts: bold-fixed, bold-italics

Non-breakable text: The quick brown fox jumps over the lazy fox.

Modern Pod constructs (multiple <>): italic, fixed with embedded < and >.

Itemize with numbers:

1.

First

2.

Second

3.

Thirs

Itemize with bullets:

  • First
  • Second
  • Thirs

Other Pod docu: Tk::Font, Tk::BrowseEntry

AUTHOR

Nick Ing-Simmons <nick@ni-s.u-net.com>

Current maintainer is Slaven Rezic <slaven@rezic.de>.

Copyright (c) 1998 Nick Ing-Simmons. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

generated by Pod::ProjectDocs
From: SREZIC [...] cpan.org
On Sat Feb 24 09:01:54 2007, SREZIC wrote: Show quoted text
> Pod::Projectdocs does not convert non-ascii characters correctly. The > module handles symbolic > entities correctly (e.g. E<auml>). The module does not handle numeric > entities correctly (e.g. > E<0x20ac>). This will be converted to &0x20ac; but should be &#0x20ac; > (note the missing #). > Also, literal iso-8859-1 characters above 160 are not handled > correctly. They are copied as-is > to the generated XHTML source which is wrong, as XHTML expects utf-8 > if not stated otherwise. > Pod::Projectdocs also does not handle the new "=encoding" directive to > switch to another > encoding for the Pod document. > > Compare http://search.cpan.org/~srezic/Tk-Pod-0.9932/Pod/Text.pm how > highbit characters > should look like (the german umlauts at the bottom of the page) and > the output as generated by > pod2projectdocs in the attachment. > > Regards, > Slaven
Is there any progress in this issue?
Hello SREZIC, this should be fixed by https://github.com/mgruner/p5-pod-projectdocs/commit/b87f1b5c97178701371fdbe3f54f5a0797b25cc6. Pod::ProjectDocs now reads the files with the charset specified by -charset, which is also used to generate the HTML documents. This change will be in the next version 0.43. Best regards, Martin Am Sa 24. Feb 2007, 09:01:54, SREZIC schrieb: Show quoted text
> Pod::Projectdocs does not convert non-ascii characters correctly. The > module handles symbolic > entities correctly (e.g. E<auml>). The module does not handle numeric > entities correctly (e.g. > E<0x20ac>). This will be converted to &0x20ac; but should be &#0x20ac; > (note the missing #). > Also, literal iso-8859-1 characters above 160 are not handled > correctly. They are copied as-is > to the generated XHTML source which is wrong, as XHTML expects utf-8 > if not stated otherwise. > Pod::Projectdocs also does not handle the new "=encoding" directive to > switch to another > encoding for the Pod document. > > Compare http://search.cpan.org/~srezic/Tk-Pod-0.9932/Pod/Text.pm how > highbit characters > should look like (the german umlauts at the bottom of the page) and > the output as generated by > pod2projectdocs in the attachment. > > Regards, > Slaven
I forgot to mention that =encoding is not supported still and I currently don't see how this could be done.
On 2016-11-08 14:53:00, mgruner wrote: Show quoted text
> I forgot to mention that =encoding is not supported still and I > currently don't see how this could be done.
Unfortunately Pod::ProjectDocs inherits from Pod::Parser which is considered legacy, and probably does not have support for =encoding. Porting to Pod::Simple would probably help, but is probably a larger task. Maybe it's possible to create a workaround, e.g. adding a preprocessor which just handle the =encoding directives (e.g. switching the encoding layer while reading from the filehandle, or run Encode::decode() from this point if dealing with a stringy Pod).