472,142 Members | 1,086 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,142 software developers and data experts.

Disadvantages of using windows-1252 codepage?

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

Jun 17 '06 #1
12 2079
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.

"DC" <dc@upsize.de> wrote in message
news:11*********************@u72g2000cwu.googlegro ups.com...
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

Jun 17 '06 #2
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/r...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,
--
Joerg Jooss
ne********@joergjooss.de
Jun 18 '06 #3
> 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.

"Joerg Jooss" <ne********@joergjooss.de> wrote in message
news:94**************************@msnews.microsoft .com... 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/r...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,
--
Joerg Jooss
ne********@joergjooss.de

Jun 18 '06 #4
Thus wrote Kevin,
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.


Out of curiosity: What relevant browser wouldn't support Windows-1252?

Cheers,
--
Joerg Jooss
ne********@joergjooss.de
Jun 19 '06 #5
Thus wrote Joerg,
Thus wrote Kevin,
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.

Out of curiosity: What relevant browser wouldn't support Windows-1252?


Sorry, make that "doesn't"...

Cheers,
--
Joerg Jooss
ne********@joergjooss.de
Jun 19 '06 #6
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

Joerg Jooss schrieb:
Thus wrote Joerg,
Thus wrote Kevin,
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.

Out of curiosity: What relevant browser wouldn't support Windows-1252?


Sorry, make that "doesn't"...

Cheers,
--
Joerg Jooss
ne********@joergjooss.de


Jun 19 '06 #7
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.

"Joerg Jooss" <ne********@joergjooss.de> wrote in message
news:94**************************@msnews.microsoft .com...
Thus wrote Joerg,
Thus wrote Kevin,
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.

Out of curiosity: What relevant browser wouldn't support Windows-1252?


Sorry, make that "doesn't"...
Cheers,
--
Joerg Jooss
ne********@joergjooss.de

Jun 19 '06 #8
I did have a few minutes to look up one reference for you. I'll leave it to
you to read it:

http://www.w3.org/International/tuto...rial-char-enc/

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

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

"Joerg Jooss" <ne********@joergjooss.de> wrote in message
news:94**************************@msnews.microsoft .com...
Thus wrote Kevin,
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.


Out of curiosity: What relevant browser wouldn't support Windows-1252?
Cheers,
--
Joerg Jooss
ne********@joergjooss.de

Jun 19 '06 #9
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,
--
Joerg Jooss
ne********@joergjooss.de
Jun 20 '06 #10
Thus wrote Kevin,
I did have a few minutes to look up one reference for you. I'll leave
it to you to read it:

http://www.w3.org/International/tuto...rial-char-enc/


Uh... thanks for patronizing me, but what makes you assume that I didn't
know that already?

You made an interesting claim and I just wondered if you could name an example.
No reason to behave silly here.

--
Joerg Jooss
ne********@joergjooss.de
Jun 20 '06 #11
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.

"Joerg Jooss" <ne********@joergjooss.de> wrote in message
news:94**************************@msnews.microsoft .com...
Thus wrote Kevin,
I did have a few minutes to look up one reference for you. I'll leave
it to you to read it:

http://www.w3.org/International/tuto...rial-char-enc/


Uh... thanks for patronizing me, but what makes you assume that I didn't
know that already?

You made an interesting claim and I just wondered if you could name an
example. No reason to behave silly here.

--
Joerg Jooss
ne********@joergjooss.de

Jun 20 '06 #12
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".

--
Joerg Jooss
ne********@joergjooss.de
Jun 20 '06 #13

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Wilbur | last post: by
21 posts views Thread by EmJayEm | last post: by
54 posts views Thread by m.roello | last post: by
21 posts views Thread by Jonathan Sachs | last post: by
reply views Thread by Marcel Overweel | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.