-2

I want to echo a string 京icp备09001224号 (some characters are in Chinese Language) . But when i do echo for such string, it prints 京icp备09001224å·

How can i get the exact sting as output?

thanks.

Sirko
  • 72,589
  • 19
  • 149
  • 183
nir
  • 83
  • 1
  • 5
  • 11
  • 2
    Too little detail about what misinterprets the encoding. Go through the basics here: [Handling Unicode Front To Back In A Web App](http://kunststube.net/frontback/) – deceze Jun 07 '12 at 13:52
  • utf-8 encoded is enabled. Even i don't know what misinterprets. – nir Jun 07 '12 at 13:59
  • 2
    could't find any function like magically_fix_this() – nir Jun 07 '12 at 14:02
  • Don't forget to save your code file in UTF-8 and send proper `content-type=text/html; charset: utf-8` headers + proper `` tags in the HTML. – Yaniro Jun 07 '12 at 14:10
  • LOL. You two may just have created a new meme. – deceze Jun 07 '12 at 14:11

2 Answers2

1

similar question asked here In php how to display chinese character?

And here is your solution, you need to specify the encoding, to display the characters.

<meta http-equiv="Content-Type" content="text/html;charset=utf-8" ></meta>
<?php echo "京icp备09001224号"; ?>

will output like

京icp备09001224号

and test your php file encoding if this does not work. Encode your php file with utf-8.

Community
  • 1
  • 1
Sanjay
  • 1,570
  • 1
  • 13
  • 30
1

京icp备09001224å is your text printed out in Windows-Latin-1. One of the elements in your toolchain is not set to use UTF-8.

dda
  • 6,030
  • 2
  • 25
  • 34