I am creating a SLD file and uploading it though the REST API using C#. This SLD file contains some danish characters, but the end result turns out bad. For a test I save the xml file to disk before sending it.
Here is my code
WebResponse response = null;WebRequest request = null;request = WebRequest.Create(sldUrl);request.Credentials = new NetworkCredential(_userName, _password);request.ContentType = "application/vnd.ogc.sld+xml";request.Method = "PUT";sldDocument.Save("c:\\test.sld");byte[] buffer = Encoding.UTF8.GetBytes(sldDocument.ToString());Stream reqstr = request.GetRequestStream();reqstr.Write(buffer, 0, buffer.Length);reqstr.Close();response = request.GetResponse();response.Close();The local file contains this
Tr
أكثر...
Here is my code
WebResponse response = null;WebRequest request = null;request = WebRequest.Create(sldUrl);request.Credentials = new NetworkCredential(_userName, _password);request.ContentType = "application/vnd.ogc.sld+xml";request.Method = "PUT";sldDocument.Save("c:\\test.sld");byte[] buffer = Encoding.UTF8.GetBytes(sldDocument.ToString());Stream reqstr = request.GetRequestStream();reqstr.Write(buffer, 0, buffer.Length);reqstr.Close();response = request.GetResponse();response.Close();The local file contains this
Tr
أكثر...