Force Character Encoding

  • Thread starter Karl E. Peterson
  • Start date

K

Karl E. Peterson

Hi --

Okay, so how does one go about forcing character encoding? I thought
that by having this in the <head> section:

<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

That a browser would automatically choose to use ISO-8859-1, but for
some inexplicable reason I've seen pages lately where both Firefox and
IE8 choose to use Unicode instead.

These are just pretty straight-up ASP pages, with this as the very
first line:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

They're full of the diamond-question mark char, though. Ideas?

Thanks... Karl
 
Ad

Advertisements

T

Trevor Lawrence

I thought that I read somewhere in this or another NG that the server
decides what character code to use. But I am sure that someone with more
knowledge than I will reply
 
H

Hot-text

It not the webpage!
it is your Firefox and IE8 set to Unicode!

http://en.wikipedia.org/wiki/Character_encodingISO-8859-1 <<<<< Character
encoding translation and
<<<< See also Windows code page - various character set encodings used by
Microsoft Windows>>>>
<<<http://en.wikipedia.org/wiki/Windows_code_page


ISO 8859-1 Western Europe
ISO 8859-2 Western and Central Europe
ISO 8859-3 Western Europe and South European ( Turkish, Maltese plus
Esperanto )
ISO 8859-4 Western Europe and Baltic countries ( Lithuania, Estonia and
Lapp )

And can do
MS-Windows character sets:
Windows-1252 for Western languages
<meta http-equiv="Content-Type" content="text/html;charset=Windows-1252">
 
R

Ronx

As Trevor said, if the server sends an HTTP header that sets the character
encoding, the browser will use that encoding rather than the meta tag
version.

--
Ron Symonds
Microsoft MVP (Expression Web)
http://www.rxs-enterprises.org/fp

Reply only to group - emails will be deleted unread.
 
K

Karl E. Peterson

Trevor Lawrence explained on 1/6/2010 :
I thought that I read somewhere in this or another NG that the server decides
what character code to use. But I am sure that someone with more knowledge
than I will reply

Y'know, now that you say that, that does sound familiar. And I'm
seeing *identical* pages coming from different servers behaving
differently. I gotta pursue that angle. Thanks!
 
K

Karl E. Peterson

Hot-text wrote on 1/6/2010 :
It not the webpage!
it is your Firefox and IE8 set to Unicode!

Do those browsers remember what setting to use for each page and/or
server? If not, then this isn't the case. Same page, different
servers, different results.
 
Ad

Advertisements

K

Karl E. Peterson

Ronx was thinking very hard :
As Trevor said, if the server sends an HTTP header that sets the character
encoding, the browser will use that encoding rather than the meta tag
version.

That was it! Trevor nailed it. I just looked at the MIME Types on
both servers, and on the public (isn't that always the case?) box I
had:

..asp text/html;charset=utf-8
..htm text/html;charset=iso-8859-1

Where as the internal box left them both undefined. <groan>

So, is there a lesson here? Assuming a guy actually goes to the
trouble of putting the metatag in there, isn't it smarter then to
remove the MIME definition? Thoughts, anyone?

Thanks!
 
K

Karl E. Peterson

Karl E. Peterson submitted this idea :
Trevor Lawrence explained on 1/6/2010 :

Y'know, now that you say that, that does sound familiar. And I'm seeing
*identical* pages coming from different servers behaving differently. I
gotta pursue that angle. Thanks!

Stuck it! It was MIME type definitions on one of the servers. Thanks!
 
H

Hot-text

""""""YES""""""
Message Character Set Conflict
Is the Message

Send As Unicode
Or
Send AS IS ?

? ??? ??? watashi I, me >>> is Unicode here and
will be Unicode in a webpage to you all you see is <<<I, me >>>>>
For all the same word ,,,BUT NOT THE SOME TEXT____
FOR_THE_TEXT_IS_UNICODE


Arabic numerals (black)):

???????????????1?m?????? <<< TEXT UNICODE if it was in
The same headline, transliterated to the Latin alphabet:

Radokurifu, Marason gorin daihyo ni ichi-man metoru shutsujo ni mo fukumi
<<< TEXT UNICODE


<META http-equiv=Content-Type content="text/html; charset=windows-1252">
CODE ascharset=windows-1252 HERE >>>>>> &nbsp; ,,,,,&lt;&lt;&lt;
ラドクリフ、マラソン五輪代表に1万m出場にも含み


But are we Talking browsers Or HTML ?
 
Ad

Advertisements

H

Hot-text

""""""YES""""""Send AS IS

Message Character Set Conflict

This Is the Message

Send As Unicode <<<<<<<,


ç§ ã‚ãŸã— ワタシ watashi I, me >>> is Unicode here and
will be Unicode in a webpage to you all you see is <<<I, me >>>>>
For all the same word ,,,BUT NOT THE SOME TEXT____
FOR_THE_TEXT_IS_UNICODE


Arabic numerals (black)):

ラドクリフã€ãƒžãƒ©ã‚½ãƒ³äº”輪代表ã«1万m出場ã«ã‚‚å«ã¿ <<< TEXT UNICODE if it was in
The same headline, transliterated to the Latin alphabet:

Radokurifu, Marason gorin daihyŠni ichi-man mētoru shutsujŠni mo fukumi
<<< TEXT UNICODE


<META http-equiv=Content-Type content="text/html; charset=windows-1252">
CODE ascharset=windows-1252 HERE >>>>>> &nbsp; ,,,,,&lt;&lt;&lt;
ラドクリフ、マラソン五輪代表に1万m出場にも含み


But are we Talking browsers Or HTML ?
 

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

Top