Created
January 3, 2014 00:07
-
-
Save kurahaupo/8229858 to your computer and use it in GitHub Desktop.
Convert normal ascii to equivalent double-width unicode characters
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
#!/usr/bin/perl | |
use utf8; | |
binmode STDOUT, ":utf8"; | |
while (<>) { | |
s/ / /g; | |
s/\t/\t\t/g; | |
s/[!-~]/chr(ord($&)+0xff00-0x20)/xge; | |
print $_; | |
} | |
1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment