1

If i do echo(0xbf5c); it renders 0xbf5c. But it normally correspond to a chinese letter. How can i make this latter displayed ?

Thanks

aurel_lab
  • 149
  • 11

1 Answers1

0

Split the character into individual bytes and use PHP's \xhh (character with hex code hh) escape character in a double-quoted string:

header("Content-Type: text/plain; charset=GBK");
echo "\xbf\x5c";

You won't need the header line if your webserver is already configured to use the GBK charset.

Matt Raines
  • 4,149
  • 8
  • 31
  • 34