Skip to content

Instantly share code, notes, and snippets.

@binarymaster
Created October 31, 2017 11:47
Show Gist options
  • Save binarymaster/83ff951028152615843b22d34093a612 to your computer and use it in GitHub Desktop.
Save binarymaster/83ff951028152615843b22d34093a612 to your computer and use it in GitHub Desktop.
Decode JOHAB-encoded strings
<?php
// read str from IMS/SOP in Win-1252 encoding
$str = '£¡“¡¯¡Ÿ¡»a Mº—µA¬á -MBC';
// decode JOHAB
$str = iconv('UTF-8', 'CP1252', $str); // if the site page is initially in UTF-8
$str = iconv('JOHAB', 'UTF-8', $str);
echo $str;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment