Forum » Izdelava spletišč » Problem s charsetom
Problem s charsetom
Matek ::
Evo, mam eno stran. V na glavni strani (index.php) je definiran charset Windows-1250. Pol pa so gor php-includane tud ene novice iz text file-a. Te novice generira fusion news skripta. V skripti si pri templatesih lahko nastaviš tudi header za novice. Tja noter sem tudi dal charsete Windows 1250. Zdej pa ko se stran požene, ne prikaže šumnikov čisto prav. Če pa grem v nastavitve pa spremenim v Windows-1250 ali pa v samodejno izbiro, pol se pa prav ofnajo. Kaj moram naredit da bo samodejno izbralo brez nastavljanja?
Bolje ispasti glup nego iz aviona.
mnlkpo ::
problem je v apache-u, poglej header:
GET / HTTP/1.0
HTTP/1.1 200 OK
Date: Wed, 30 Oct 2002 22:47:48 GMT
Server: Apache/1.3.26 (Unix) Debian GNU/Linux mod_gzip/1.3.19.1a PHP/4.2.3
X-Powered-By: PHP/4.2.3
Connection: close
Content-Type: text/html; charset=iso-8859-1
nastavljen ma default charset v httpd.conf: AddDefaultCharset, meni je AddDefaultCharset Off resil problem
sicer naj bi apache pogledal stran in njen meta tag, samo ocitno je to bolj vudu, meni to ni nikoli delalo ok
popravek
ok, sem pogledal v docs, apache sploh ne gleda meta tag-a, poudarek je moj:
AddDefaultCharset directive
Syntax: AddDefaultCharset On|Off|charset
Context: all
Status: core
Default: AddDefaultCharset Off
Compatibility: AddDefaultCharset is only available in Apache 1.3.12 and later
This directive specifies the name of the character set that will be added to any response that does not have any parameter on the content type in the HTTP headers. This will override any character set specified in the body of the document via a META tag. A setting of AddDefaultCharset Off disables this functionality. AddDefaultCharset On enables Apache's internal default charset of iso-8859-1 as required by the directive. You can also specify an alternate charset to be used.
For example:
AddDefaultCharset utf-8
Note: This will not have any effect on the Content-Type and character set for default Apache-generated status pages (such as '404 Not Found' or '301 Moved Permanently') because those have an actual character set (that in which the hard-coded page content is written) and don't need to have a default applied.
GET / HTTP/1.0
HTTP/1.1 200 OK
Date: Wed, 30 Oct 2002 22:47:48 GMT
Server: Apache/1.3.26 (Unix) Debian GNU/Linux mod_gzip/1.3.19.1a PHP/4.2.3
X-Powered-By: PHP/4.2.3
Connection: close
Content-Type: text/html; charset=iso-8859-1
nastavljen ma default charset v httpd.conf: AddDefaultCharset, meni je AddDefaultCharset Off resil problem
sicer naj bi apache pogledal stran in njen meta tag, samo ocitno je to bolj vudu, meni to ni nikoli delalo ok
popravek
ok, sem pogledal v docs, apache sploh ne gleda meta tag-a, poudarek je moj:
AddDefaultCharset directive
Syntax: AddDefaultCharset On|Off|charset
Context: all
Status: core
Default: AddDefaultCharset Off
Compatibility: AddDefaultCharset is only available in Apache 1.3.12 and later
This directive specifies the name of the character set that will be added to any response that does not have any parameter on the content type in the HTTP headers. This will override any character set specified in the body of the document via a META tag. A setting of AddDefaultCharset Off disables this functionality. AddDefaultCharset On enables Apache's internal default charset of iso-8859-1 as required by the directive. You can also specify an alternate charset to be used.
For example:
AddDefaultCharset utf-8
Note: This will not have any effect on the Content-Type and character set for default Apache-generated status pages (such as '404 Not Found' or '301 Moved Permanently') because those have an actual character set (that in which the hard-coded page content is written) and don't need to have a default applied.
Zgodovina sprememb…
- spremenilo: mnlkpo ()
Gandalfar ::
ja sem nastavil da je default charset utf-8 sam ne vem, ce to res hocem. Kaj pa ce bom kaksne japonce hostal na strani? mislm ne more se vsak user verjetn zmisljevat kaksn encoding bi imel. Drugace sem zdaj dal na utf-8 in zgleda da deluje.
mnlkpo ::
ja, zdaj je samo Content-Type: text/html. torej ce das apache-u uft-8, se neha vmesavat :). krneki.
Gandalfar ::
hm ne .. zdej je DefaultCharset Off .. k sem dal na Utf-8 so zacele pismenke dogajat ^_^
kunigas ::
A mi lahko, prisim, samo namignes s katerim programomo oz. na kaksen nacin si se lotil dela z novicami ...
Gandalfar ::
tale Charset zlo zlo zanimivo deluje na prikaz spletnih strani... sem dal nazaj tko kokr je na zacetku k drgac se full cudn obnasa..
Matek ::
kunigas, za novice mam fusion news, drugace je pa itak malo morje takih skript.
Aha, torej gandalf ne more porihtat, a ma kdo kako idejo kak bi jaz to postimu, al je cisto server-side problem?
Sam a ce das off pol strani cudno delajo?
A lahko jaz bilokaj naredim da b stran sama prešaltala userju kodiranje v auto-select?
Aha, torej gandalf ne more porihtat, a ma kdo kako idejo kak bi jaz to postimu, al je cisto server-side problem?
Sam a ce das off pol strani cudno delajo?
A lahko jaz bilokaj naredim da b stran sama prešaltala userju kodiranje v auto-select?
Bolje ispasti glup nego iz aviona.
Zgodovina sprememb…
- spremenil: Matek ()
mnlkpo ::
ok, mal smo bluzli, evo, to je vse:
1. apache se ne sme mesat v Content-Type, torej v httpd.conf mora bit AddDefaultCharset Off
2. vsaka stran more met meta tag in nastavt pravi charset
1. apache se ne sme mesat v Content-Type, torej v httpd.conf mora bit AddDefaultCharset Off
2. vsaka stran more met meta tag in nastavt pravi charset
Matek ::
Evo, zdej mam pa definiran iso-8859-2 v headerju, brskalnik pa sam nastavi na 8859-1. AddDefaultCharset je Off.
Bolje ispasti glup nego iz aviona.
Vredno ogleda ...
Tema | Ogledi | Zadnje sporočilo | |
---|---|---|---|
Tema | Ogledi | Zadnje sporočilo | |
» | [XAMPP] Server se polomi ob čšžđćOddelek: Izdelava spletišč | 1708 (1541) | alexa-lol |
» | Kako dobit šumnik iz bazeOddelek: Izdelava spletišč | 2837 (2695) | MRB0rYS |
» | MySQL in czsOddelek: Izdelava spletišč | 3623 (2713) | krho |
» | Šumniki in znaki s strehcami se ne prikazujejo pravilno!Oddelek: Izdelava spletišč | 2118 (2003) | Jackass |
» | problem s šumniki v apacheOddelek: Izdelava spletišč | 1981 (1785) | plavko61 |