I have confirmed that the data source terminates lines with \r\n (Hex 0D0A). Here is an API response captured with Postman:
00000000: 4D 53 46 54 0D 0A 4D 69 63 72 6F 73 6F 66 74 0D MSFT..Microsoft.
00000010: 0A 44 61 74 65 2C 41 64 6A 75 73 74 65 64 20 50 .Date,Adjusted P
00000020: 72 69 63 65 2C 4F 70 65 6E 2C 4C 6F 77 2C 48 69 rice,Open,Low,Hi
00000030: 67 68 2C 56 6F 6C 75 6D 65 0D 0A 30 32 2F 31 34 gh,Volume..02/14
00000040: 2F 32 30 32 35 2C 34 30 37 2E 36 31 37 30 2C 34 /2025,407.6170,4
00000050: 30 36 2E 39 37 37 30 2C 34 30 35 2E 30 36 35 30 06.9770,405.0650
00000060: 2C 34 30 38 2E 31 30 32 30 2C 32 32 37 35 38 2E ,408.1020,22758.
00000070: 34 36 30 30 0D 0A 30 32 2F 31 38 2F 32 30 32 35 4600..02/18/2025
00000080: 2C 34 30 38 2E 38 32 35 30 2C 34 30 37 2E 31 38 ,408.8250,407.18
00000090: 36 30 2C 34 30 35 2E 36 38 34 30 2C 34 30 39 2E 60,405.6840,409.
000000a0: 37 38 36 30 2C 32 31 34 32 33 2E 30 35 30 30 0D 7860,21423.0500.
000000b0: 0A 30 32 2F 31 39 2F 32 30 32 35 2C 34 31 33 2E .02/19/2025,413.
000000c0: 39 34 34 30 2C 34 30 37 2E 30 36 36 30 2C 34 30 9440,407.0660,40
000000d0: 36 2E 38 33 31 30 2C 34 31 34 2E 36 36 39 30 2C 6.8310,414.6690,
000000e0: 32 34 31 31 34 2E 32 30 30 30 0D 0A 30 32 2F 32 24114.2000..02/2
000000f0: 30 2F 32 30 32 35 2C 34 31 36 2E 31 33 30 30 2C 0/2025,416.1300,
00000100: 34 31 35 2E 32 39 30 30 2C 34 31 32 2E 35 34 30 415.2900,412.540
00000110: 30 2C 34 31 39 2E 33 31 30 30 2C 32 33 35 30 38 0,419.3100,23508
00000120: 2E 37 33 30 30 0D 0A 30 32 2F 32 31 2F 32 30 32 .7300..02/21/202
00000130: 35 2C 34 30 38 2E 32 31 30 30 2C 34 31 37 2E 33 5,408.2100,417.3
00000140: 33 35 30 2C 34 30 37 2E 38 39 30 30 2C 34 31 38 350,407.8900,418
00000150: 2E 30 34 38 30 2C 32 37 35 32 34 2E 38 30 30 30 .0480,27524.8000
00000160: 0D 0A
I modified the JScript in AmiQuote to write the input data to a file without doing any modification:
// the processing function takes text as input and produces text as ouput
function Process(input)
{
// Create an instance of the FileSystemObject
var fso = new ActiveXObject("Scripting.FileSystemObject");
// Open the text file for writing
var file = fso.OpenTextFile("C:\\Temp\\Input.txt", 2, true);
// Write the input to the text file
file.Write(input);
// Close the text file
file.Close
return input;
}
Using a hex editor from VS Code, I confirmed that the output file (which is the input passed to my JScript by AmiQuote) has no line termination characters:
This is consistent with what I see in the AmiQuote Debug window: no line terminators in the Processed Content (which in fact is unmodified).
I am using 64-bit AmiQuote v4.17, which I believe is the most recent version. It still seems to me that the most likely explanation for the behavior that I'm seeing is that AmiQuote has removed the \r\n characters from the API response. I'm happy to look into other possibilities if you have any suggestions.