Re: cp1252 not being read as windows-1252

On Wed, 21 Mar 2007, Ben Sandberg wrote:

> This is a ProStores hosted store -- their servers dictate the doctype as 
> cp1252, but the Validator doesn't recognize that as windows-1252.
> I've set an .htaccess AND a META tag.  Neither are changing the results of 
> the Validator.

The issue is character encoding, or "charset", _not_ doctype. The string 
"cp1252" is not a registered name for an encoding; the name "windows-1252" 
should be used instead. On the other hand, using that encoding is usually 
not a good choice, especially on interactive pages that contain forms. 
(What happens when a user enters a character that is not representable in 
the encoding used?)

Anyway, "cp1252" and "cp-1252" are widely used synonyms for 
"windows-1252", so perhaps the validator should recognize them, even 
though they are unregistered. It could of course issue a warning about 
them.

At least on the main page of ProStores, if you mean 
http://www.prostores.com , the encoding is not specified at all - not in 
HTTP headers, not in a meta tag. This means in practice that the user 
agent must guess. On the other hand, if they have the same policy for all 
pages, you can specify the encoding in a meta tag. Such a tag cannot 
however override HTTP headers. Moreover, .htaccess may or may not help 
- it depends on server policy. What really happens is thus unclear, 
especially since you didn't specify a URL.

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

Received on Sunday, 25 March 2007 15:37:57 UTC