How do I use Unicode characters in Pod and perldoc?

后端 未结 3 769
悲&欢浪女
悲&欢浪女 2021-01-01 11:50

I need to use utf-8 characters in my perl-documentation. If I use:

perldoc MyMod.pm

I see strange characters. If I use:

pod         


        
相关标签:
3条回答
  • 2021-01-01 12:12

    Found this RT ticket.... http://rt.cpan.org/Public/Bug/Display.html?id=39000

    This "bug" seems to be introduced with Perl 5.10 and perhaps this pod2man --utf8 needs to be used.

    0 讨论(0)
  • 2021-01-01 12:24

    Use =encoding utf-8 as the first POD directive in your file, and use a fairly recent perldoc (for example from 5.10-maint). Then it should work.

    0 讨论(0)
  • 2021-01-01 12:32

    perldoc -t MyMod.pm

    From the perldoc manual:

    -t Display pod using pod2text instead of Pod::Man and groff (-t is the default on win32 unless -n is specified)

    0 讨论(0)
提交回复
热议问题