Parsing UTF8 encoded data from a Web Service
I'm parsing the date from http://toutankharton.com/ws/localisations.php?l=75

As you can see, it's encoded (`<name>Paris 2ème</name>`).

My code is the following :

    using (var reader = new StreamReader(stream, Encoding.UTF8))
                {
                    var contents = reader.ReadToEnd();

                    XElement cities = XElement.Parse(contents);

                        var t = from city in cities.Descendants("city")
                                                        select new City
                                                        {
                                                            Name = city.Element("name").Value,
                                                            Insee = city.Element("ci").Value,
                                                            Code = city.Element("code").Value,
                                                        };
                }

Isn't `new StreamReader(stream, Encoding.UTF8)` sufficient ?
Parsing UTF8 encoded data from a Web Service
===

I'm parsing the date from http://toutankharton.com/ws/localisations.php?l=75

As you can see, it's encoded (`<name>Paris 2ème</name>`).

My code is the following :

    using (var reader = new StreamReader(stream, Encoding.UTF8))
                {
                    var contents = reader.ReadToEnd();

                    XElement cities = XElement.Parse(contents);

                        var t = from city in cities.Descendants("city")
                                                        select new City
                                                        {
                                                            Name = city.Element("name").Value,
                                                            Insee = city.Element("ci").Value,
                                                            Code = city.Element("code").Value,
                                                        };
                }

Isn't `new StreamReader(stream, Encoding.UTF8)` sufficient ?