Created
January 12, 2011 11:14
-
-
Save sortega/776027 to your computer and use it in GitHub Desktop.
Fix garbled encoding (latin1 reencoded as utf8)
This file contains 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 strict; | |
use Encode; | |
binmode( STDIN, ':utf8' ); | |
binmode( STDOUT, ':latin1' ); | |
while (<>) { | |
print Encode::decode('utf8', $_); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment