UTF8 perldoc Rant!

jbisbee on 2008-07-08T11:15:26

Man this is annoying, I cut and paste code form a SYSNOPSIS to test a module for the first time and come to find out that my single quotes aren't single quotes and my dashes aren't dashes... This definitely doesn't seem like the right behavior for any text that is indented (ie code samples) I don't care about the rest of the text, make it pretty and all, but leave the characters in code sample's alone!

"’" used for single quotes ('), "−" used for dashes (-)
As I was writing this I went and changed Terminal -> Preferences -> Advanced -> International -> Character Encoding from "Unicode (UTF-8)" to "Western (ISO Latin 1)" and its no longer an issue (the original characters are being used throughout perldoc's output)

So the question is, is this a problem with perldoc or a just a problem with Terminal.app? And if it is perldoc, should I submit a bug?


nroff

osfameron on 2008-07-08T12:59:44

I've complained about this with ubuntu's terminal too. If I remember correctly, the culprit is nroff and the problem can be worked around by setting locale to a more C-like one, or by using -t to use the plain-text converter instead of nroff.

LANG=C

jbisbee on 2008-07-08T16:03:07

From rjbs

alias man="LANG=C man"
alias perldoc="LANG=C perldoc"