[linux] Re: [linux] apache a kodovanie stranok

Matej Pivoluska pivoluska na matfyz.cz
Pátek Září 12 17:59:04 CEST 2003


On Fri, Sep 12, 2003 at 05:23:18PM +0200, Ondrej Ivanic wrote:
> Matus UHLAR - fantomas wrote:
> >>1) kodovanie nieje v HTTP hlavicke a ani v dokumente
> >>Vysledok je nepredvidatelny
> > 
> > standardne kodovanie je iso-8859-1 a ak nie je kodovanie uvedene, mal by ho
> > browser ukazat v tomto.
> 
> Preco? To si zobral kde?

V manuale k Apache.

> 
> >>5) kodovanie je v HTTP hlavicke a dokument specifikuje ine
> >>Mozilla pouzije z HTTP hlavicky
> >>IE pouzije z dokumentu
> > 
> > ... a porusuje standard. 
> 
> Aky? HTTP? To niekde nieje. Chyba moze byt aj na strane web serveru, 
> lebo web server by mal/moze (en: may) pouzit informacie z meta tagu 
> ktory na atribut 'http-equiv' na vytvorenie odpovedajucej HTTP hlavicky.

http://www.w3.org/TR/html401/charset.html#h-5.2.2
[snip]
To sum up, conforming user agents must observe the following priorities when determining a document's character encoding (from highest priority to lowest):

   1. An HTTP "charset" parameter in a "Content-Type" field.
   2. A META declaration with "http-equiv" set to "Content-Type" and a value set for "charset".
   3. The charset attribute set on an element that designates an external resource.

In addition to this list of priorities, the user agent may use heuristics and user settings. For example, many user agents use a heuristic to distinguish the various encodings used for Japanese text. Also, user agents typically have a user-definable, local default character encoding which they apply in the absence of other indicators.
[/snip]

> Ondrej Ivanic
> (ondrej na kmit.sk)

mP



Další informace o konferenci linux