Php varsayılan web tarayıcısı karakter kodlaması

3 Cevap

Herkes nasıl web tarayıcısı karakteri Ben batı (ISO-8859-1) kodlayan karakteri kullanarak sayfa tüm kullanıcı damla umut php kodlama, varsayılan biliyor mu

3 Cevap

Before printing/echoing anything else bunu

header('Content-Type: text/html; charset=ISO-8859-1');

Bu HTTP başlıklarını değişecek ve kullanıcının tarayıcı ayarlarından aksini belirtmediği sürece, sayfanız için ISO-8859-1 tarayıcının varsayılan kodlamasını koyacaktır.

Sen Content-Type üstbilgisi çıktısı ile karakter kodlama ayarlayabilirsiniz.

header('Content-Type: text/html; charset=ISO-8859-1');

Bu sayfaları okumak için bu karakter setini kullanmak için tarayıcı anlatacağım.

Bunun yerine web uygulamaları her bu başlığı header('Content-Type: text/html; charset=ISO-8859-1'); yazmanın sizin .htaccess dosyasında bu basit bir çizgi ekleyebilirsiniz

AddDefaultCharset iso-8859-1

Her zaman charset başlığını yayınlamaya Apache yapar.

Otherwise you could set once for all the php.ini directive default_charset to "iso-8859-1". On most web hosters is usually set to empty string. In order to do this once for all you need either to access the server main php.ini file or get an hoster with suPHP that will allow you to use your specific php.ini file in the same way you use .htaccess files. (suPHP is used by almost every webhosters).