|
From: Schwalbe, M. (S. 1) <mat...@cr...> - 2013-09-12 07:59:41
|
Hi Rob, There is a (simple) problem with SesameHttpProtocolVersion6Connector (and potentially other Connectors) in calls to both the synchronous and asynchronous versions of the Update(...) function. The SPARQL update queries get encoded in url encoded web form format: httpRequest.ContentType<http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System:4.0.0.0:b77a5c561934e089/System.Net.WebRequest/property:ContentType:String> = "application/x-www-form-urlencoded"; The character set used by: builder.Append<http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:4.0.0.0:b77a5c561934e089/System.Text.StringBuilder/Append(String):System.Text.StringBuilder>(HttpUtility<http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Web:4.0.0.0:b03f5f7f11d50a3a/System.Web.HttpUtility>.UrlEncode<http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Web:4.0.0.0:b03f5f7f11d50a3a/System.Web.HttpUtility/UrlEncode(String):String>(this.EscapeQuery<http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://dotNetRDF:0.9.0.0:6055ffe4c97cc780/VDS.RDF.Storage.BaseSesameHttpProtocolConnector/EscapeQuery(String):String>(sparqlUpdate))); UrlEncode(...) is utf-8, but the default format for decoding application/x-www-form-urlencoded, according to WEB documentation, is iso8859-1 which leads to garbled literal texts. This happens once text in the query uses characters outside the Latin character range, e.g. Chinese character, accented letters, umlauts. The simplest way to fix this would be to explicitly also state the character encoding used: httpRequest.ContentType = "application/x-www-form-urlencoded; charset=utf-8"; This character set it always used by UrlEncode(...) Thanks a lot sincerely yours PS: I used the latest (yesterday) dotNetRdf build from NuGet Matthias Schwalbe CREDIT SUISSE AG CREDIT SUISSE | IT Services, SQAS 1 Uetlibergstr. 231 (A/B+ZN) | 8070 Zürich | Switzerland Phone +41 44 333 86 10 mat...@cr...<mailto:mat...@cr...> | www.credit-suisse.com<http://www.credit-suisse.com> |