summaryrefslogtreecommitdiff
path: root/lib/meta_notation.t
Commit message (Collapse)AuthorAgeFilesLines
* lib/meta_notation: Fix so C1 controls are escapedKarl Williamson2015-12-141-1/+9
| | | | | Prior to this commit the meta notation for C1 controls included raw C0 controls.
* Create single fcn for dup'd /lib codeKarl Williamson2015-03-191-0/+40
Several /lib .pm's have the same code which is complicated enough to warrant being placed in a shared function. This commit creates a .pm to be used by these .pm's. This implements the perhaps archaic 'Meta' notation wherein characters above 0x7f are displayed as M- plus the ASCII-range character derived by looking at only the lower 7 bits of the upper range one. There are problems with this, in that a literal control character can be in the string, whereas it is trying to get rid of control characters. But I left it to work as-is, just centralizing the code. On EBCDIC platforms this notation makes no sense because the bit patterns are all mixed up about having the upper bit set. So this commit fixes things on these platforms, so these are changed to \x{...}. No literal control characters are emitted. Another potential problem is that characters above 0xFF are passed through, unchanged. But again, I let the existing behavior stand.