views:

26

answers:

2

HI I have the following (apparently simple) problem: I have to install a simple website, made by someone else, on a web hosting account. The site consists of lot and lot of HTML pages, no dynamic content, created some in MS Word and saved as html, some in frontpage, etc. A mixed bag.

I uploaded initially on a test account on my server (Win Server 2003) and it works ok. Then I uploaded on the real web hosting (fedora / apache). When I loaded the site in browser I see lot of odd craracters (instead of diacritics, used in html pages). Duacritics were saved as escape code, like & #350; for Ș (using codepage 1252).

The problem is, when I load the page from my own test server, the browser select automatically correct codepage (1252).

But when I load the site from public host, the same bowser loads the page using utf-8 encoding, rendering page with odd caracrets.

The test site on my server can be seen at http://radu-stanian.dnsalias.com and on public server at http://radustanian.scoli.edu.ro/

This happens no matter what browser I use (IE, ff or chrome)

What should I do to force browsers to load the pages in correct codepage?

Making changes to every page is not an option, because there are hundreds of pages, created by various peoples which could edit them further for update

Thank you

A: 

I did a quick google search and this is what I came up with: http://www.w3.org/International/questions/qa-htaccess-charset

I've never messed with the .htaccess files with this scenario, but from what I read up it seems like you can force a certain character codepage mode based on file extension, which is what you need.

I'm not sure if it works, but hopefully it does :)

Jeffrey Kern
Another option is to put the charset in the HTML itself via a <meta http-equiv="Content-Type; charset=..."> tag. Most web servers are smart enough to look for that and update the HTTP Content-Type header accordingly, and if they do not, web browsers are smart enough to look for the <meta> tag.
Remy Lebeau - TeamB
Thanks, but it's not an option. There are lot and lot of files, and very likely some of their creators might change them later and re-upload, overwriting my change. And with extension it's not an option either, it means I should change all references of every link in the website
bzamfir
A: 

Most web servers allow you to edit HTTP headers. One of them can specify the exact codepage for a browser to use.

For example:

Content-Type: text/html; charset=ISO-8859-4

Pavel Radzivilovsky
Thanks, but it seems for some reason I cannot edit / alter .htaccess . I created a htaccess file, uploaded it and then renamed to .htaccess (over ftp) but in the end I see no .htaccess file - it dissapear. And I cannot contact the admins of the website : they don't answer to email. Any suggestion how to upload .htaccess file directly from within windows?
bzamfir