Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

UTF-8 Problems

Hi,

I am trying CityDesk (the free version). When I publish my pages which include Greek, both IE6 and Mozilla do not manage to select UTF-8 as the encoding of the page. I always have to go and change that manually in order to "see" Greek.

I even have <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> first one after the <head> tag.

What should I do?

Thanks,

Petros

Petros Amiridis
Monday, October 13, 2003

What's the URL?

What Operating System are you using?

Joel Spolsky
Thursday, October 16, 2003

The URL is http://users.otenet.gr/~pamir/Articles/ListofHealthyFood.html

I will have to ask my ISP for operating system and web server.

I use CityDesk on Win2k Pro.

Petros

Petros Amiridis
Thursday, October 16, 2003

That's very strange. Only thing I can suggest is, maybe your language meta tag is confusing the browsers? Try removing the line,
<meta http-equiv="Content-Language" content="en-us">
and see what happens.

Martha
Thursday, October 16, 2003

The problem appears to be your web server. It sends a conflicting encoding.  Here are the HTTP headers returned for your home page:

HTTP/1.1 200 OK
Date: Fri, 17 Oct 2003 03:36:06 GMT
Server: Apache/2.0.45 (Unix)
Last-Modified: Wed, 15 Oct 2003 18:47:54 GMT
ETag: "e3957-a88-336eca80"
Accept-Ranges: bytes
Content-Length: 2696
Connection: close
Content-Type: text/html; charset=ISO-8859-7

Joel Shprentz
Thursday, October 16, 2003

I had no problems with CityDesk 1.0 but I am having UTF-8 problems using CityDesk 2.0.

- My site is http://southernnewmexico.com (there are accented characters in the feature article currently on the main page).

- My HTML looks like this

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

- Auto-Select for encoding in MS IE 6.0 results in European Windows being chosen.

- If I change the browser's encoding to UTF-8, everything looks correct.

- I am using AOLServer with OpenACS from OpenACS.org.

David Burch
Friday, October 17, 2003

David, your AOL server looks like it is configured to return the header

Content-Type: text/html; charset=iso-8859-1

In AOLserver this was probably accomplished with the following line in nsd.ini:

[ns/mimetypes]
.html=text/html; charset=iso-8859-1

To overcome this problem you could either change it to
[ns/mimetypes]
.html=text/html; charset=utf-8

or just
[ns/mimetypes]
.html=text/html

Joel Spolsky
Saturday, October 18, 2003

Thanks Joel!

David Burch
Saturday, October 18, 2003

Why would an ISP enforce only .html=text/html; charset=iso-8859-7 and not just leave it plain html=text/html? What would they want to achieve by specifying the charset other than make my pages look funny?

I know I should ask them, but I just wanted some guesses from you guys before I talk to my ISP.

Petros Amiridis
Saturday, October 18, 2003

Because some ISPs are just clueless? (members.aol.com sends a completely invalid charset, for example.)

Martha
Monday, October 20, 2003

*  Recent Topics

*  Fog Creek Home