Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2006

Tip: Looking for answers? Try searching our database.

Character encoding - 1252 vs. ISO-8859-1

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JS - 17 Mar 2006 16:37 GMT
I was wondering why one would specify character encoding of 1252 vs.
ISO-8859-1 when retrieving data via HTTP.  My circumstance is that I am
retrieving XML via HTTP with French characters in it and I have
specified the encoding as follows:

Dim str as New StreamReader([data source],
system.text.encoding.getencoding("ISO-8859-1"))

Doing this works fine and I retrieve the data without the special
French characters being dropped.  When I change the above line of code
to the following:

Dim str as New StreamReader([data source],
System.Text.Encoding.GetEncoding(1252))

The end result is the same.

Is there any advantage to one encoding over another?
Joerg Jooss - 17 Mar 2006 18:35 GMT
Thus wrote js,

> I was wondering why one would specify character encoding of 1252 vs.
> ISO-8859-1 when retrieving data via HTTP.  My circumstance is that I
[quoted text clipped - 12 lines]
>
> Is there any advantage to one encoding over another?

Well, both are dated. Windows-1252 is actually an extension of ISO-8859-1.
See http://www.microsoft.com/globaldev/reference/sbcs/1252.mspx and http://www.microsoft.com/globaldev/reference/iso/28591.mspx.
ISO-8859-1 does not contain €, nor the uppercase and lowercase "oe" ligature
(Unicode \u0152 and \u0153). Windows-1252 contains both.

Modern applications should rather use one of the Unicode Transformation Formats
like UTF-8.

Cheers,
Signature

Joerg Jooss
news-reply@joergjooss.d

JS - 17 Mar 2006 19:15 GMT
> Well, both are dated. Windows-1252 is actually an extension of
> ISO-8859-1. See
[quoted text clipped - 6 lines]
> Modern applications should rather use one of the Unicode
> Transformation Formats like UTF-8.

Okay, that is what I was thinking (in terms of the difference between
the two of them) when I was researching the issue but figured that
there must be something else I was missing.  Unfortunately I cannot get
our remote partners to switch to UTF-8 (or something else more current)
so I am stuck with it but at least I feel comfortable with what I am
doing.

Thank you Joerg; great informations and assistance as always.

J.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.