Skip to content

Instantly share code, notes, and snippets.

@larsen
Created September 27, 2013 08:24
Show Gist options
  • Save larsen/6725620 to your computer and use it in GitHub Desktop.
Save larsen/6725620 to your computer and use it in GitHub Desktop.
Fix double encoded string
use Encode;
use Encode::DoubleEncodedUTF8;
my $dodgy_utf8 = "Some byte strings from the web/DB with double-encoded UTF-8 bytes";
my $fixed = decode("utf-8-de", $dodgy_utf8); # Fix it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment