RadioBOSS API XML issue

eddr

Member
Hello,

We have a VBScript script using the RadioBOSS API (playbackinfo) which gets the current track, inserts a stream track and then plays the inserted track. It usually works fine, until there is an umlaut in the XML content (e.g. ?). Basically the XML document class cannot handle the umlaut character and I think this is down to the encoding being incorrect, set at the web server.

The guidelines by Microsoft on encoding XML found @ https://msdn.microsoft.com/en-us/library/aa468560.aspx state the correct XML document encoding and corresponding HTTP header. Using Fiddler to look at the HTTP traffic I can see the content-type is set to "text/xml charset=us-ascii" - this is overriding the encoding within the XML output (which is correct, UTF-8).

After investigating this, it seems text/xml is seen as 'deprecated' and application/xml should be used instead.

I setup a Windows Apache (web server) installation and created a copy of the output from 'playbackinfo' and can confirm the VB script works ok with this - there is no content-type in the http header here, and so the encoding within the XML (encoding="UTF-8"?>) is adhered to.

I've attached a screenshot showing the traffic in Fiddler.

Can this please be fixed? :)

Interesting sources:
https://en.wikipedia.org/wiki/XML - "The use of text/xml has been criticized as a potential source of encoding problems and it has been suggested that it should be deprecated"

http://www.grauw.nl/blog/entry/489 - "according to the standard, text/*-MIME types have a us-ascii character set unless otherwise specified in the HTTP headers. This effectively means that any encoding defined in the XML prolog (e.g. <?xml version=?1.0? encoding=?UTF-8??>) is ignored. This is of course not the expected and desired behaviour."

http://www.w3.org/2006/02/son-of-3023/draft-murata-kohn-lilley-xml-04.html - "Major differences from [RFC3023] are deprecation of text/xml"

Thanks in advance
Edd
 

Attachments

  • Fiddler.jpg
    Fiddler.jpg
    239.1 KB · Views: 443

djsoft

Well-known member
Staff member
I suppose it's a problem with how VBScript handles this, because we've never seen such issues when testing API using PHP or similar technologies (they seem to ignore encoding set in headers and use XML encoding instead, which is UTF8).

The headers will be fixed in the next update - RadioBOSS 5.7.
 
Top