Disadvantages of using windows-1252 codepage?

D

DC

We are about to go online with an ASP.Net site. We have found that it
is easiest for us to use windows-1252 content encoding, since that
solves our problems with some special characters. Are there some
general disadvantages about using this codepage (most sites I know use
utf-8 or iso) - I am thinking of things like search engine
incompatibilities - or should it be OK to use 1252?

Thanks for any hint in advance,

Regards
DC
 
K

Kevin Spencer

The characters in the windows-1252 code page that are different (0x80 to
0x9F), and apparently the reason you want to use it, are not recognized by
most browsers, and are not supported by HTML standards. You would do better
to use the standard UTF-8 encoding, and use HTML-Encoding for special
characters.

Any character can be HTML-Encoded by using the &#number sequence in the
HTML, in which "number" is the numerical value of the character. For
example, 'ä' would be HTML-Encoded as &#228. In addition, you can use the
System.Web.HttpServerUtility.HtmlEncode (or the
System.Web.HttpUtility.HtmlEncode) method to ensure that any block of text
is properly HTML-encoded, without having to HTML-encode individual
characters, or know their numeric values. Only illegal HTML characters will
be encoded. Similarly, blocks of text can be decoded back into their
original state using the HttpDecode method.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

I recycle.
I send everything back to the planet it came from.
 
J

Joerg Jooss

Thus wrote Kevin,
The characters in the windows-1252 code page that are different (0x80
to 0x9F), and apparently the reason you want to use it, are not
recognized by most browsers, and are not supported by HTML standards.

They are regular Unicode characters and thus can be represented as HTML entities.
Otherwise, a page like http://www.microsoft.com/globaldev/reference/sbcs/1252.mspx
couldn't exist ;-)

Also, Windows-1252 is registered with IANA, and supported on many platforms.
Actually, I would assume that there's no modern platform that doesn't offer
support for Windows-1252.
You would do better to use the standard UTF-8 encoding, and use
HTML-Encoding for special characters.

I won't disagree with that :)

Cheers,
 
K

Kevin Spencer

Also, Windows-1252 is registered with IANA, and supported on many
platforms. Actually, I would assume that there's no modern platform that
doesn't offer support for Windows-1252.

Platforms? Sure. Browsers? No.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

I recycle.
I send everything back to the planet it came from.
 
D

DC

Thank you for the discussion. I also thought that we would be better
off to use utf-8 or iso, but a lot of our static and db content is not
properly encoded for anything else than 1252. From what I hear we will
not get catastrophic results with using 1252 but we should convert our
content and preferrably use utf-8 if we can.

Regards
DC
 
K

Kevin Spencer

I couldn't say offhand. First you would have to define "relevant." Then I
would have to check. But if you're curious, and since you already know what
your definition of "relevant" is, and since my time is *highly* limited, I
suggest that you might check for yourself.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

I recycle.
I send everything back to the planet it came from.
 
J

Joerg Jooss

Thus wrote Kevin,
I couldn't say offhand. First you would have to define "relevant."

Something web developers generally consider worthwhile to develop and test
for.
Then I would have to check. But if you're curious, and since you
already know what your definition of "relevant" is, and since my time
is *highly* limited, I suggest that you might check for yourself.

Thanks, no. Assuming you either get a recent Mozilla or Firefox build for
any *NIX, BSD or Linux, the answer probably is that there is no issue.

Cheers,
 
K

Kevin Spencer

Gee, Joerg, I'm sorry I was patronizing you. I only hope that someday I can
be as kind and uninsulting as you are in my own responses.

--

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

I recycle.
I send everything back to the planet it came from.
 
J

Joerg Jooss

Thus wrote Kevin,
Gee, Joerg, I'm sorry I was patronizing you. I only hope that someday
I can be as kind and uninsulting as you are in my own responses.

Please -- not another useless fight.

I didn't realize you considered one of my previous responses insulting --
I'm still befuddled why and when...

I was really just wondering if you happen to know an example where Windows-1252
blows up in your face and one would say "Geez, I didn't expect *that* to
happen".
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top