On Mono : iso-8859-1 (as String) On .Net : String.Empty ... and of course there is no Encoding for string.Empty
Selon Kornél Pál <[EMAIL PROTECTED]>: > >Why in Mono/Linux the field is ok and not on .Net/Windows ? > > Please let us know the exact objHttpReponse.CharacterSet value(s) that you > experienced causing ArgumentException because that helps to understand the > problem. > > Kornél > > ----- Original Message ----- > From: <[EMAIL PROTECTED]> > To: "Mono List" <[email protected]> > Sent: Monday, November 13, 2006 1:56 PM > Subject: [Mono-list] HttpWebResponse : Encoding info (Mono better than > .Net???) > > > Hi, > > My apps make a request on internet with an HttpWebRequest and an > HttpWebResponse. For some weeks I got trouble with specials char (é, à, ù > [...]). > > I find a solution : > // -1- get response > HttpWebResponse objHttpReponse = objHttpRequest.GetResponse(); > // -2- Get the stream > objStream = objHttpReponse.GetResponseStream(); > // -3- Create a reader to manipulate the stream : > StreamReader objReader = new StreamReader(objStream, > Encoding.GetEncoding(objHttpReponse.CharacterSet)); > > As you can see, I give the CharacterSet to the GetEncoding method. > > On Mono/Linux, no trouble, I've something in the CharacterSet and the > StreamReader is well created. ("et j'ai mes accents !!!!" :-)). > > I compiler my apps goes on .Net/Windows and ... : > System.ArgumentException: is not a supported encoding name. > Parameter name: name > at System.Globalization.EncodingTable.internalGetCodePageFromName(String > name > ) > at System.Globalization.EncodingTable.GetCodePageFromName(String name) > > > >From what I see Character Set is empty ... > > My question : > Why in Mono/Linux the field is ok and not on .Net/Windows ? > > Thanks ! > > _______________________________________________ > Mono-list maillist - [email protected] > http://lists.ximian.com/mailman/listinfo/mono-list > > _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
