Google Grupper har inte längre stöd för nya Usenet-inlägg eller -prenumerationer. Historiskt innehåll förblir synligt.
Stäng

How can i change the Default encode on the Apache Pages ??

0 visningar
Hoppa till det första olästa meddelandet

Juda Barnes

oläst,
18 maj 2003 12:37:472003-05-18
till
my apache run with phpBB Hebrew edition ,
each time i loading a page i have to change the encoding for that page to

Hebrew Windows or Hebrew Iso Logical


where can i set in the apache a default coding for a page or somethng like that

i have asked on the phpBB forums and it seems to be problem with tha apache

sincerly
juda barnes

Andreas Paasch

oläst,
18 maj 2003 14:49:132003-05-18
till
Juda Barnes wrote:

Actually, it's not a server issue.
Apache can run every possible combination of website encodings .. it's a
matter of webpage encoding.

Apache can have another default setting, but not in a way that may work as
you seem to want. www.apache.org can tell you more.

What you seem to need is

<meta http-equiv="Content-Type" CONTENT="text/html; charset=iso-8859-1">

set in your <head></head> of your webpage. Of course with the correct
charset.

Sounded to me that this is what you need ....

HTH,

/Andreas

--
Registeret Linux user #292411

Alan J. Flavell

oläst,
18 maj 2003 15:31:272003-05-18
till
On Sun, May 18, Andreas Paasch inscribed on the eternal scroll:

[quotes the entire posting - always a worrying sign on usenet]

> Actually, it's not a server issue.

Certainly it is. You appear to be unfamiliar with RFC2616.

> Apache can have another default setting, but not in a way that may work as
> you seem to want. www.apache.org can tell you more.

If you want to know about server settings, you'd look at
http://httpd.apache.org/docs/ (or the corresponding 2.0
documentation), I'd suggest looking at AddCharset and related
directives.

However, the questioner was asking specifically about PHP-generated
pages. http://www.php.net/manual/en/function.header.php documents
PHP's function for preparing appropriate header(s). The charset
obviously goes on the Content-type header. Pay attention to the
caution:

| Remember that header() must be called before any actual output is
| sent, either by normal HTML tags, blank lines in a file, or from PHP.

> What you seem to need is
>
> <meta http-equiv="Content-Type" CONTENT="text/html; charset=iso-8859-1">
>
> set in your <head></head> of your webpage.

Since, according to RFC2616, the real HTTP-protocol charset takes
precedence over anything set by meta http-equiv, I don't think this
ersatz method is a good choice. Plus it's going to cause extra
problems of compatibility if/when you move to XHTML (check XHTML/1.0
Appendix C for advice).

And of course iso-8859-1 isn't Hebrew, but I'm sure the questioner
realised that.

good luck

Andreas Paasch

oläst,
18 maj 2003 18:08:112003-05-18
till
Alan J. Flavell wrote:


> Certainly it is. You appear to be unfamiliar with RFC2616.

You are truly right about this. I stand corrected.

>
> If you want to know about server settings, you'd look at
> http://httpd.apache.org/docs/ (or the corresponding 2.0
> documentation), I'd suggest looking at AddCharset and related
> directives.


I second that, was what I meant at least.

>
> However, the questioner was asking specifically about PHP-generated
> pages. http://www.php.net/manual/en/function.header.php documents
> PHP's function for preparing appropriate header(s). The charset
> obviously goes on the Content-type header. Pay attention to the
> caution:

Misread, lost the php part.

>
> And of course iso-8859-1 isn't Hebrew, but I'm sure the questioner
> realised that.
>

Guess we all knew this one.

Once again I learn more .. wonderful world :-)

0 nya meddelanden