charset/encoding

Discussion in 'HTML' started by =?ISO-8859-1?Q?L=FCpher_Cypher?=, Feb 18, 2005.

  1. I am developing a site that supports 3 languages (en-us,de,ru). In order
    to show the pages using the right charset, I use meta tags. I haven't
    faced this before so, maybe I missed something, but here's what I do for
    Russian:

    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-5"/>
    <meta http-equiv="Content-Language" content="ru"/>

    When I load the page in IE/NS though, the browser still uses the default
    encoding, and unless I manually switch it, the characters won't show up
    right.
    Anyone knows what the problem is?

    Thanks
    Lüph
     
    =?ISO-8859-1?Q?L=FCpher_Cypher?=, Feb 18, 2005
    #1
    1. Advertising

  2. Lüpher Cypher wrote:

    > I am developing a site that supports 3 languages (en-us,de,ru). In order
    > to show the pages using the right charset, I use meta tags.


    http://www.htmlhelp.com/tools/validator/charset.html

    > I haven't faced this before so, maybe I missed something, but here's what
    > I do for Russian:
    >
    > <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-5"/>
    > <meta http-equiv="Content-Language" content="ru"/>


    XHTML, text/html and ignoring Appendix C? http://w3.org/TR/xhtml1/#C_2

    > When I load the page in IE/NS though, the browser still uses the default
    > encoding, and unless I manually switch it, the characters won't show up
    > right.
    > Anyone knows what the problem is?


    Your server is probably sending a character encoding in the read http
    headers. This overrides meta data claiming to be equiv to http headers.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, Feb 18, 2005
    #2
    1. Advertising

  3. David Dorward wrote:
    >
    >>I haven't faced this before so, maybe I missed something, but here's what
    >>I do for Russian:
    >>
    >><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-5"/>
    >><meta http-equiv="Content-Language" content="ru"/>

    >
    > XHTML, text/html and ignoring Appendix C? http://w3.org/TR/xhtml1/#C_2


    Thanks! I missed that part! I try to keep as close to the standard as
    possible :)

    >
    >>When I load the page in IE/NS though, the browser still uses the default
    >>encoding, and unless I manually switch it, the characters won't show up
    >>right.
    >>Anyone knows what the problem is?

    >
    >
    > Your server is probably sending a character encoding in the read http
    > headers. This overrides meta data claiming to be equiv to http headers.
    >


    That seems reasonable, since when I go to rambler.ru, which has ru
    encoding, it all shows up right. Would you know, by any chance, how to
    fix it in Apache? :) - I'm running a "local" server to write everything
    before I actually spend money to put the site up :)

    Thank you!
    Lüph
     
    =?ISO-8859-1?Q?L=FCpher_Cypher?=, Feb 18, 2005
    #3
  4. =?ISO-8859-1?Q?L=FCpher_Cypher?=

    Smike Guest

    Lüpher Cypher wrote:
    > I am developing a site that supports 3 languages (en-us,de,ru). In

    order
    > to show the pages using the right charset, I use meta tags. I haven't


    > faced this before so, maybe I missed something, but here's what I do

    for
    > Russian:
    >


    To see Cyrillic text you should put use the one of following META tags

    <META content="text/html; charset=windows-1251"
    http-equiv=Content-Type>
    if you are using Win1251 8-bit Cyrillic encoding


    or

    <META content="text/html; charset=koi8r" http-equiv=Content-Type>
    if you are using KOI8 8-bit Cyrillic encoding

    or you may avoid utilization of any of presented above META TAGs and
    specify text in UNICODE
    codes directly, example:

    <font color="#000000" size="3">
    Русский
    </font>

    The latest way looks complicated, but in this way you have guaranteed
    result of Russian text presentation.
    (no manual switching is required).
    To convert Russian text to UNICODE codes you may use editor/decoder
    from:
    http://www.russiantext.ircdb.org/ruseditE.htm

    Regards
    Smike
    http://smike.ru
     
    Smike, Feb 18, 2005
    #4
  5. Lüpher Cypher wrote:

    >> XHTML, text/html and ignoring Appendix C? http://w3.org/TR/xhtml1/#C_2


    > Thanks! I missed that part! I try to keep as close to the standard as
    > possible :)


    You should probably read http://www.w3.org/TR/xhtml-media-types/ too then.

    >> Your server is probably sending a character encoding in the read http
    >> headers. This overrides meta data claiming to be equiv to http headers.


    > That seems reasonable, since when I go to rambler.ru, which has ru
    > encoding, it all shows up right. Would you know, by any chance, how to
    > fix it in Apache?


    http://httpd.apache.org/docs-2.1/mod/mod_mime.html#charset-lang

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, Feb 18, 2005
    #5
  6. Smike wrote:
    > Lüpher Cypher wrote:
    >
    >>I am developing a site that supports 3 languages (en-us,de,ru). In

    >
    > order
    >
    >>to show the pages using the right charset, I use meta tags. I haven't

    >
    >
    >>faced this before so, maybe I missed something, but here's what I do

    >
    > for
    >
    >>Russian:
    >>

    >
    >
    > To see Cyrillic text you should put use the one of following META tags
    >
    > <META content="text/html; charset=windows-1251"
    > http-equiv=Content-Type>
    > if you are using Win1251 8-bit Cyrillic encoding
    >


    That's what I use (cp1251), and I tried this meta tag - same result -
    until I explicidly choose that it's 1251, it still uses ISO-8859-1
    encoding.. I checked my apache config and it does not send an "override"
    header. Strange..

    > or you may avoid utilization of any of presented above META TAGs and
    > specify text in UNICODE
    > codes directly, example:
    >
    > <font color="#000000" size="3">
    > Русский
    > </font>
    >
    > The latest way looks complicated, but in this way you have guaranteed
    > result of Russian text presentation.
    > (no manual switching is required).
    > To convert Russian text to UNICODE codes you may use editor/decoder
    > from:
    > http://www.russiantext.ircdb.org/ruseditE.htm
    >


    I figure that's probably the best way to go, as, as far as I remember,
    Unicode can allow me to use russian characters with conjuntion of german
    ones (which overlap in cp1251), and I may need both sometimes. I'll take
    a look at it :)

    Lüph
     
    =?ISO-8859-1?Q?L=FCpher_Cypher?=, Feb 21, 2005
    #6
  7. Smike wrote:

    > The latest way looks complicated, but in this way you have guaranteed
    > result of Russian text presentation.
    > (no manual switching is required).
    > To convert Russian text to UNICODE codes you may use editor/decoder
    > from:
    > http://www.russiantext.ircdb.org/ruseditE.htm


    Wow! Thanks so much! All the problems with typing it up (changing fonts
    and I don't have Rus on my keyboard, I just vaguely recall where the
    keys are) and storing it in mySQL (charsets) are solved in a jiff! :)
    This is the perfect way! :)
    You just can't imagine how much you just helped me :))

    Lüph
     
    =?ISO-8859-1?Q?L=FCpher_Cypher?=, Feb 21, 2005
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. J.P.Jarolim
    Replies:
    0
    Views:
    1,055
    J.P.Jarolim
    Feb 27, 2004
  2. James
    Replies:
    2
    Views:
    3,393
    Michael Borgwardt
    Jul 1, 2004
  3. sunil
    Replies:
    0
    Views:
    604
    sunil
    Jul 28, 2004
  4. Fritz Bayer
    Replies:
    1
    Views:
    4,293
    Wibble
    May 30, 2005
  5. optimistx

    javascript charset <> page charset

    optimistx, Aug 14, 2008, in forum: Javascript
    Replies:
    2
    Views:
    279
    optimistx
    Aug 15, 2008
Loading...

Share This Page