Last active
August 29, 2015 13:59
-
-
Save jettero/10580331 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| s/\x00/␀/g; # seems like 00 => 2400 | |
| s/\x07/␇/g; # and 07 => 2407 … implies that there's | |
| # an easy transform that would literally do | |
| # \x00 — \0x20 → \u2400 — \u2420 automatically. | |
| # damned if I know it though. | |
| __END__ | |
| #perl corgifex suggests something like: "\0\1\2"; s/([\x00-\x1f])/"\x{2400}" | $1/eg | |
| that has problems though .. like DEL=127; so he also suggests: | |
| tr(\x00-\x1f)(\x{2400}-\x{241f}); | |
| … which is about as short-and-readable as I think it can get. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment