Having trouble geting the encoding right in my silverlight application.
I need support for western europe letters like æ,ø,å,â and so(Latin1??).
But I can't get it right. What should be instead of SOMEENCODINGHERE? did try
Encoding enc = Encoding.GetEncoding("Latin1"); but no names I used as param was recognized =( .
If I use Encoding.Unicode tr.ReadLine() reads the whole file and convert it to Chinese for some reason.

But GetEncoding want string as parameter not an integer
–
QwarkAug 8 '09 at 18:21

Well there's an overload that takes a string - but at least in the desktop framework, there's an overload taking an integer. Does that not exist in Silverlight? Have you tried it?
–
Jon SkeetAug 8 '09 at 20:09

Yes I have tried it, The file I have is a dictionary that I download from a 3rd party provider. And do not know the Encoding of. I think I going to write someting that convert the file to UTF-8.
–
QwarkAug 9 '09 at 0:03

Silverlight (1-4, don't known about 5) doesn't support ANSI Encodings (codepages). It supports only Unicode encodings: UTF8 and UTF16.
See http://msdn.microsoft.com/en-us/library/system.text.encoding%28VS.95%29.aspx for details.
So suggested Encoding.GetEncoding(1252) and any other codepage numbers do not work.
You have to implement your Encoding class for needed codepage.
If you have found an appropriate implementation please share it, i'd be interesting.