Page 1 of 1

Multilinugal pages in php

Posted: Tue Nov 23, 2010 1:57 am
by dj00791
I am having an html code with multi lingual characters displayed. Same code when i use in php format. It gives ??????? instead of the multilingual characters.
Appreciate if any one can help me to resolve this.

PHP code

Code: Select all

<?php #String-UTF-8.php
# 
#
  $help_simplified = '简体中文网页';
  $help_tradition = '简体中文网页';
  print('<html>');
  print('<meta http-equiv="Content-Type"  content="text/html; charset=utf-8"/>');
  print('<body>');
  print('<b>Chinese string in UTF-8 in PHP</b><br/>');
  print($help_simplified.'<br/>');
  print($help_tradition.'<br/>');
  print('</body>');
  print('</html>');
?>

Re: Multilinugal pages in php

Posted: Tue Nov 23, 2010 10:21 am
by Christopher
Maybe because you are missing the <head></head> tags?

Code: Select all

<?php #String-UTF-8.php
# 
#
  $help_simplified = '简体中文网页';
  $help_tradition = '简体中文网页';
  print('<html>');
  print('<head>');
  print('<meta http-equiv="Content-Type"  content="text/html; charset=utf-8"/>');
  print('</head>');
  print('<body>');
  print('<b>Chinese string in UTF-8 in PHP</b><br/>');
  print($help_simplified.'<br/>');
  print($help_tradition.'<br/>');
  print('</body>');
  print('</html>');
?>

Re: Multilinugal pages in php

Posted: Wed Nov 24, 2010 7:01 am
by dj00791
Please see the output of the modified php file as per your suggestion
http://www.gameswiki.org/jd2.php

ITs still not working.

Regards,
John