2
Vote

problems when submitting certain characters to api through Calais.NET

description

I'm using the open calais API on the .NET platform on c# and i have noticed that if i submit content with irregular characters like the name "André", the application crashes. This does not seem to be an issue on the open calais viewer however.
 
Sample Code:
 
             var calais = new CalaisDotNet("api-key", "André  Zaz  <mmmm@gmail.com>");
             var document = calais.Call<CalaisRdfDocument>();
 
Crashes on the line (from CalaisRdfDocument.cs):
 
        var docInfo = (from item in doc.Root.Descendants(rdf + "Description")
                       where item.Element(rdf + "type").Attribute(rdf + "resource").Value == _docInfoUri
                       select item).Single();
with Exception InvalidOperationException was unhandled - Sequence contains no elements

comments