0

I have this page http://abone.doganburda.com/test/indexNew.php, when it was .html file there was no problem with Special Turkish character, everything was displayed correctly,

when I added some php code to it, and made it .php file, the special charcters showed this problem ,there is a part of the file is taken from external xml file is not displaying correctly,

I have added

header('Content-Type: text/html; charset=utf-8');

and I have in the header the following but none of this solved the problem

<?php 
header('Content-Type: text/html; charset=utf-8');
?>
<!DOCTYPE html>
<html class=" js csstransitions" xmlns="http://www.w3.org/1999/xhtml">


<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">

you can see this here

Bu site, Do?an Burda Dergi Yay?nc?l?k ve Pazarlama A.?. taraf?ndan T.C. yasalar?na uygun olarak yay?nlanmaktad?r. Sitenin isim ve yay?n haklar? Do?an Burda Dergi Yay?nc?l?k ve Pazarlama A.?.?ye aittir. Sitede yay?nlanan yaz?, foto?raf, harita, illüstrasyon ve konular?n her hakk? sakl?d?r. ?zinsiz,kaynak gösterilerek dahi al?nt? yap?lamaz.

it should be displayed correctly as here http://abone.doganburda.com/test/

Bu site, Doğan Burda Dergi Yayıncılık ve Pazarlama A.Ş. tarafından T.C. yasalarına uygun olarak yayınlanmaktadır. Sitenin isim ve yayın hakları Doğan Burda Dergi Yayıncılık ve Pazarlama A.Ş.’ye aittir. Sitede yayınlanan yazı, fotoğraf, harita, illüstrasyon ve konuların her hakkı saklıdır. İzinsiz,kaynak gösterilerek dahi alıntı yapılamaz.

this is the response header for my php page

HTTP/1.1 200 OK

Date: Thu, 01 May 2014 13:19:53 GMT

Server: Apache/2.2.13 (FreeBSD) mod_ssl/2.2.13 OpenSSL/0.9.8e PHP/5.2.11 with Suhosin-Patch

X-Powered-By: PHP/5.2.11

Keep-Alive: timeout=5, max=100

Connection: Keep-Alive

Transfer-Encoding: chunked

Content-Type: text/html; charset=utf-8

Content-Language: tr

how can I display those special characterrs correctly

mfadel
  • 887
  • 12
  • 32
  • 1
    Did you **save** the file with UTF-8 encoding? Check your editor! – René Roth May 01 '14 at 13:31
  • I have set notepad++ to utf8 encoding, but it seems this is from a previous stage, I have solved this problem – mfadel May 01 '14 at 13:45
  • I want to understand something, why it was .html everything was displayed correctly, then I added php code and the special character showed the problem – mfadel May 01 '14 at 13:55
  • 1
    Are you saying that as a straight HTML file, the accented characters showed correctly (were edited and displayed as UTF-8), but when you added PHP code, they were corrupted? Or did the text itself go through an editing process (e.g., to put it into PHP _echo_ statements)? At some point, these characters appear to have been changed to some single-byte encoding, which is invalid in UTF-8. – Phil Perry May 01 '14 at 14:22
  • “404 - File or directory not found.” when trying to access the page mentioned. This demonstrates why links to live pages are not sufficient in problem descriptions. – Jukka K. Korpela May 01 '14 at 14:42
  • #Phil Perry I have removed the html page this is it will be referred to 404 – mfadel May 01 '14 at 14:56

0 Answers0