I have greek characters stored in latin_swedish_ci collation in a database, which are stored as html special characters
for example athens is stored as Aθήνα
when i try and echo the special characters they display as 'Aθήνα' and not the greek for athens. This only happens if i echo in <script> tags, for example
Code: Select all
<script>
var a = <?php echo $name; ?>
</script>
the output of var a will be Aθήνα
How can I decode the characters
I am using php version 4.3.10
I tried iconv but it did not work. this is my setup in php.ini
iconv support - enabled
iconv implementation - glibc
iconv library version - 2.3.4
iconv.input_encoding - local and master value is ISO-8859-1
iconv.internal_encoding - local and master value is ISO-8859-1
iconv.output_encoding - local and master value is ISO-8859-1