MBSCurl - c.outputData = "?" ??? on Linux ???

Development is going great on Windows and Mac… but Linux… I cannot get MBSCurl to work …
I’m getting exceptions :frowning: I’m getting a JSONException because js is NIL… because data = ?

[code] dim uri as string = “https://bittrex.com/api/v1.1/public/getcurrencies
dim c as new CURLSMBS
c.OptionURL = uri
c.OptionVerbose = true
c.CollectDebugData = true
c.CollectOutputData = true
c.OptionSSLVerifyHost = 0
c.OptionSSLVerifyPeer = 0

dim e as integer = c.Perform
dim data as string = c.OutputData

dim js as new JSONItem(data)[/code]

the last line throws an exception, and when i look at the string value of data it is ?
This works 100% on mac and windows… and I’ve moved over the mbscurl and mbsmain libraries to the opt/xojo/xojo2014r2.1/plugins/ folder… and restarted xojo… I’m pretty close to giving up on linux, even though it is going to be a huge part of the release :confused: Any help from Christian or anyone else would be highly appreciated.

Whats the encoding of the data ? UTF-8 ?
try using DefineEncoding on the received string and see if that fixes it.
Any time you get data from outside your program you should make sure you define the encoding.

I just tried it here on Mac and the result is okay.

On linux, the result has right length as I get 47169 bytes reported and downloaded.
But first character of download data is wrong, so JSON parsing fails.

I’m not sure why the first byte is wrong here, but you can replace it with “{” to fix the problem as a workaround.

data = “{” + midb(data, 2 )

and fixed. Memory was overwritten, but only in rare case on Linux.
I can email you a fixed plugin.

you can download fixed plugin here:

please try.