I try to convert a script of me from R2 to R3 and have a problem with read.
The command I use is for R2 and R3 identical:
print to-string read to-url "http://download.finance.yahoo.com/d/quotes.csv?s=%5EGDAXI&f=sl1d1t1c1ohgv&e.csv"
and the answer is:
"^GDAXI",7795.31,"3/28/2013","12:45pm",+6.22,7791.14,7842.58,7778.02,0
In R3:
print to-string read to-url "http://download.finance.yahoo.com/d/quotes.csv?s=%5EGDAXI&f=sl1d1t1c1ohgv&e.csv"
and the answer is:
"%5EGDAXI",0.00,"N/A","N/A",N/A,N/A,N/A,N/A,N/A
Does anybody know what is going wrong?
Thanx
Raimund
Ok, not a bug, but an improvement.Reading https://en.wikipedia.org/wiki/Percent-encoding suggests that the behaviour of R3 is correct and R2 is at fault.This is also the same in other languages such as Rubye.g.>> URI::encode "%"=> "%25"It sounds like Andreas has given you a workaround to solve your immediate issue as well.All good.Cheers,John
On Tuesday, April 2, 2013 10:28:26 AM UTC+11, John wrote:This does appear to be a bug.Even in the case of a charR2 gives>> to-url #"%"== %whereas R3 gives>> to-url #"%"== %25All the other chars I tested with R3 seemed to behave correctly such as # or @.I have raised a bug in curecode so hopefully it will be resolved soon :-)Thanks,John