in Php, I want to print Düsseldorf using
echo 'Düsseldorf';
However it turns out to be something like this D�sseldorf
Please suggest what should I do to print european characters mostly non-english.
If you are able to specify it as a constant, do the following.
$echo 'Düsseldorf';
For further information refer to the chart here: http://www.ascii.cl/htmlcodes.htm
Every character that's printable has a corresponding HTML entity.
The PHP, File and HTML encoding should be the same.
For PHP:
<?php header('Content-Type: text/html; charset=utf-8'); ?>
Check the encoding of your text editor.
For HTML:
<meta charset=utf-8>
The quick and dirty way:
echo 'Düsseldorf ist eine sch&oouml;ne Stadt!';
// Düsseldorf ist eine schöne Stadt!