Jump to content

API - timers list contains invalid characters (according to Visual Stu


uglyned

Recommended Posts

Posted

Hi,

 

Having a go at reading in the timer list using the new async processes in Visual Studio 2012.

 

The application throws an exception when reading in the timer list direct into a string, stating the following (I'm using the ?utf8 parameter in the query string).

 

'The character set provided in ContentType is invalid. Cannot read content as string using an invalid character set'

 

However, if I read it into a byte array, then use UTF8 encoding to convert it to string, it works OK.

 

So no big issue - there's an easy workaround, just thought you might like to know.

 

 

Posted

Could please you provide a sample xml, which includes the problematic entries?

Posted

It was an '&'. Food & Drink. Programme has finished now. I just turned the feed into a char array and manually omitted the '&' and it was fine. Weird.

Posted

It may have been .Net Framework being a bit picky - I haven't found VS2012 to be all that stable at the moment.

Posted

I think it's picky. I tried it with several the webbrowsers and they didn't complain about the encoding of & or other special chars...

Posted

Sounds like it to me. Easy to substitute chars it doesn't like so not an issue. Sounds like it's not a 'real' issue.

×
×
  • Create New...