Bavid Dailey Posted April 9 Share Posted April 9 I have scripts that read the metadata from streams (forwarded by Firestorm) and there are occassions when the data has clearly been coded , but not in a way that I can make sense of. For example, I receive Enrico Pieranunzi/Thomas Fonnesb%3*%1-k/Andr%3* Ceccarelli - The Heart of a Child where I expect to see The Heart of a Child · Enrico Pieranunzi · Thomas Fonnesbæk · André Ceccarelli I should add that most of the time most ascii characters come through without issue, that is I see diacriticals and so on. I am baffled as to why these characters are encoded (presumably by the streaming service) and how to undo the encoding. Anybody have a clue ?. This behaviour turns up on serveral streams, although I'm not sure whether it is one or more stream providers. Link to comment Share on other sites More sharing options...
Quistess Alpha Posted April 9 Share Posted April 9 7 minutes ago, Bavid Dailey said: Enrico Pieranunzi/Thomas Fonnesb%3*%1-k/Andr%3* Ceccarelli - The Heart of a Child That looks somewhat like URL encoding, which llUnescapeURL would fix, but doesn't look like that fixes that specific example. 1 Link to comment Share on other sites More sharing options...
Bavid Dailey Posted April 9 Author Share Posted April 9 Yes I thought so too, but it doesn't pan out. I consulted chatGPT about this and it did no better than me. Link to comment Share on other sites More sharing options...
Quistess Alpha Posted April 9 Share Posted April 9 do you have any more examples of what special characters map to what encoding? it's interesting both those specific examples have %3* Link to comment Share on other sites More sharing options...
Bavid Dailey Posted April 9 Author Share Posted April 9 Not at the moment, it's a rare occurrance and this is the first time I have lookedinto it systematically. RAre = once every few days on a stream, I'd guess Link to comment Share on other sites More sharing options...
Bubblesort Triskaidekaphobia Posted April 12 Share Posted April 12 That might be a way to hide what song is played, just enough to avoid getting DMCAed by a record label. The track name is legible to listeners, but bots scanning for everybody playing songs from the Universal Music catalogue, for example... those bots will miss it. A track name like that might even poison some SQL implementations on a bot like that, for all I know. I don't really know SQL very well, but I can see how those slashes and stuff might translate into something like drop table, maybe? That's probably a stretch. Link to comment Share on other sites More sharing options...
Bavid Dailey Posted April 12 Author Share Posted April 12 Bubbesort, interesting idea. Don't think it applies here, it was from a legitimate commercial internet radio stream - Jazz Groove. But it is a possibility in general. 1 Link to comment Share on other sites More sharing options...
Xiija Posted April 12 Share Posted April 12 (edited) @Bavid Dailey does the station you are using show what encoding they are using? Looks like it's not UTF-8 mebbe? can you check with something like this? key XMLRequest; default { state_entry() { } touch_start(integer total_number) { string url = "http://whatisland.macchiatomedia.org:8118/stats?sid=1"; XMLRequest = llHTTPRequest( url , [HTTP_USER_AGENT, "XML-Getter/1.0 (Mozilla Compatible)", HTTP_METHOD, "GET", HTTP_MIMETYPE,"application/xml;charset=utf-8", HTTP_BODY_MAXLENGTH,16384, HTTP_PRAGMA_NO_CACHE,TRUE], ""); } http_response(key k,integer status, list meta, string body) { if(k == XMLRequest) { if(status != 200) { llOwnerSay("error code\n"); return; } llOwnerSay("Body: \n" + body); llOwnerSay("Meta: " + llDumpList2String( meta, "\n") ); } } } I checked this shoutcast station and i see this... Quote [08:14] Object: Body: <?xml version="1.0" encoding="UTF-8" standalone="yes" ?><SHOUTCASTSERVER><CURRENTLISTENERS>4</CURRENTLISTENERS><PEAKLISTENERS>58</PEAKLISTENERS><MAXLISTENERS>5000</MAXLISTENERS><UNIQUELISTENERS>4</UNIQUELISTENERS><AVERAGETIME>37371</AVERAGETIME><SERVERGENRE>Contemporary Reggae</SERVERGENRE><SERVERGENRE2></SERVERGENRE2><SERVERGENRE3></SERVERGENRE3><SERVERGENRE4></SERVERGENRE4><SERVERGENRE5></SERVERGENRE5><SERVERURL>http://www.itswhatisland.com</SERVERURL><SERVERTITLE>WHAT?! Island</SERVERTITLE><SONGTITLE>Byron Lee & the Dragonaires - Tiny Winey</SONGTITLE><STREAMHITS>16202</STREAMHITS><STREAMSTATUS>1</STREAMSTATUS><BACKUPSTATUS>0</BACKUPSTATUS><STREAMLISTED>1</STREAMLISTED><STREAMPATH>/stream</STREAMPATH><STREAMUPTIME>1631032</STREAMUPTIME><BITRATE>128</BITRATE><SAMPLERATE>44100</SAMPLERATE><CONTENT>audio/mpeg</CONTENT><VERSION>2.5.5.733 (posix(linux x64))</VERSION></SHOUTCASTSERVER> ETA: sorry, i think that is the XML encoding, but you may still be able find the ID3 tags if they are included?.. if they are using non-standard encoding, they should list what they are using ? Edited April 12 by Xiija Link to comment Share on other sites More sharing options...
Bavid Dailey Posted April 16 Author Share Posted April 16 Good idea Xiija, however stymied by the Linden proxy, i received an error code 502; the station stream url is http://158.69.74.203:80 Link to comment Share on other sites More sharing options...
Xiija Posted April 16 Share Posted April 16 @Bavid Dailey yah, sadly the info from ... "http://158.69.74.203:80/stats?sid=1" ... was basic, no metadata either however their website has a contact mail for feedback or questions ... mail@swissgroove.ch . Link to comment Share on other sites More sharing options...
Bavid Dailey Posted April 19 Author Share Posted April 19 I did send an inquiry to that mail address and had no response. In the end I added code to simply filter out %<x><y> and replace with ?? when I received the title... Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now