Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] XEmacs 21.4.15 and UTF8



On 10/6/05, Scott Robbins <scottro@example.com> wrote:

> On Thu, Oct 06, 2005 at 06:22:27PM +0900, Josh wrote:
>
> > Does anybody have any ideas? In the meantime, I am using EUC-JP
> > encoding, which works fine, but Firefox defaults to Western
> > (ISO-8859-1) even though I have the following in my <head> section:
> >
> > <meta http-equiv="content-type" content="text/html; charset=euc-jp" />
> >
> > Does anyone know why *this* is not working? It works fine for Jim
> > Breen's WWWJDIC pages.
>
> He fixed it by adding the following php code.   (I don't know php, and at present, I'm
> waiting for confirmation from him, as to my <very limited> knowledge, it seems as if
> he mistyped.  He also said that he "put it at the top".  Again, not
> knowing php, I don't know if this means above the <head> tag or not.
>
> <?
> header('Content-type: text/html; charset=UTF-8');
> ?>

This injects a "Content-type" header into the HTTP response itself.
The <meta> tag should do the same thing; it is an instruction to the
browser to act like it saw the following header.

> To my (again very limited) understanding of php, I suspect that the
> first line should be <?php  rather than just a question mark, and I'm
> also not sure if it was his typing or my emailer that put the <? and
> ?> on separate lines, as every other example that I remember seeing
> would have it on the same line as the actual code.

No, this is fine. If you are *just* doing PHP, you do not have to
worry about putting a "php" after the "<?". It is only when you mix
server-side scripting languages inline that you *must* be specific.

Also, whitespace does not matter between the <? and ?> tags.

> Ah, here's the explanation of why the META tags might not be working.
>
> http://my.opera.com/community/forums/topic.dml?id=10942

I will take a look.

Cheers,
Josh


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links