charset/encoding

  • Thread starter =?ISO-8859-1?Q?L=FCpher_Cypher?=
  • Start date
?

=?ISO-8859-1?Q?L=FCpher_Cypher?=

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
 
D

David Dorward

Lüpher Cypher said:
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.
 
?

=?ISO-8859-1?Q?L=FCpher_Cypher?=

David said:
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 :)
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
 
S

Smike

Lüpher Cypher said:
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
 
?

=?ISO-8859-1?Q?L=FCpher_Cypher?=

Smike said:
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?=

Smike said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top