How can I make browser to recognize encoding of my xhtml pages?

Discussion in 'HTML & Website Design' started by Zagor-Te-Nej, Nov 23, 2006.

  1. #1
    Hello everyone,

    I seem to have a little problem. Currently I'm working on localization of one web site from English to Serbian language. For Serbian I use windows-1250 charset (utf-8 can be used too). But I'm having problems displaying some specific characters in the browser. Here is how my header looks:
    <?xml version="1.0" encoding="windows-1250"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="sr" lang="sr">
        <head>
            <meta http-equiv="content-type" content="text/html; charset=windows-1250" />
    Code (markup):
    My files are saved as ascii in my code editor.
    The Strangest thing is that files are displayed properly when viewed locally on my hard drive, but as soon as I upload them on my server and try to view them in the browser (any browser), browser displays the page using standard ISO-8859-1 charset.

    How can I make browser to recognize encoding of my xhtml pages?

    Any ideas?
     
    Zagor-Te-Nej, Nov 23, 2006 IP