Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: strange output characters from perldoc

by kcott (Abbot)
on May 01, 2012 at 03:45 UTC ( #968203=note: print w/ replies, xml ) Need Help??


in reply to strange output characters from perldoc

G'day dbae,

I have the same problem using Mac OS X 10.7.3 and Perl 5.14.2 with the Mac application Terminal. I've used a number of different OSes over the years and haven't seen this issue previously: this suggests a Mac OS X problem; although, it could be related to just the perldoc implementation on Mac OS X.

I use ANSI escape codes in $PS1 and $PS2 and these seem to work perfectly. From my .bash_profile:

PS1='\[\033[0;36m\]\u@\h: \w\n\$ \[\033[0m\]' PS2='\[\033[0;36m\]> \[\033[0m\]'

While fixing this is on my TODO list, it has a fairly low priority as I tend to use http://perldoc.perl.org in preference to the commandline perldoc. Looking for a quick fix some months ago, I investigated $TERM values (suggested above) as well as $LANG and $LC_* (locale) values. I didn't find a solution in whatever timeframe I allotted but these are areas I would be researching further in the future: perhaps that's of some use to you.

-- Ken


Comment on Re: strange output characters from perldoc
Select or Download Code
Replies are listed 'Best First'.
Re^2: strange output characters from perldoc
by Anonymous Monk on May 15, 2013 at 02:02 UTC

    Try looking at your PAGER environment variable. Mine was set to "more" and it was messing up from the output from perldoc (although normal "man" worked fine). I switched PAGER to be "less -R" and now perldoc looks good.

    This is using xterm on FreeBSD, FWIW.

      ++ Thanks! I had less; less -R is a vast improvement.

      -- Ken

      Perfect. This solved my problem too! My term was xterm-256color and man worked fine, although perldoc had escape sequences just like described here. setting my PAGER to less -R solved it for me!!! Thank you!!
Re^2: strange output characters from perldoc
by Anonymous Monk on May 01, 2012 at 06:45 UTC

    although, it could be related to just the perldoc implementation on Mac OS X.

    No, no it couldn't, see for yourself

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://968203]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2015-07-30 05:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (270 votes), past polls