<?php
$corrupted = "เน„เธกเนˆเธกเธ";
// Convert the double-encoded UTF-8 back to raw bytes (which were UTF-8)
$raw_bytes = mb_convert_encoding($corrupted, 'Windows-1252', 'UTF-8');
// The raw bytes should now be valid UTF-8!
echo "Raw bytes as string: " . $raw_bytes . "\n";
