I use a encoded string as a key in array, and also uses the same string as a value in the array, like below code indicates:
$string = \'something in some enc
Are you viewing it through your browser? Then you need to specify the encoding:
header('Content-Type: text/plain; charset=UTF-8'); // or BIG5, or whatever
Are you viewing it in your terminal? Make sure your terminal settings are set to that same encoding.