It looks like JMP on Windows does not handle IEC_8859-15 very well. Here's a work-around (the sockets will not work for https, only for http) if you need it. Mostly taken from the re-written scripting example in JMP 13.1. At the end, the page is imported with iso-8859-1; it appears to be close enough; the wikipedia page shows eight characters that might be problems.
// <<connect is used to connect to a remote computer with an open listening socket.
// some web sites require www, some don't like it. Some require the HTTP/1.1 format, some are happy with HTTP/1.0 in the GET.
// You'll want to make the error handling more robust...
skt = Socket();
rc = skt << connect( "www.infoclimat.fr", "80" );
If( rc[2] != "ok",
Show( rc );
Stop();
);
// request a resource from the remote computer. the trailing slash in the example might or might not be needed.
skt << Send(
Char To Blob(
"GET /observations-meteo/archives/24/janvier/2017/grenoble-st-geoirs/07486.html HTTP/1.1~0d~0aHost: www.infoclimat.fr~0d~0aConnection: Close~0d~0a~0d~0a",
"ascii~hex"
)
);
// gather the response, it might be more than one buffer
blob = Char To Blob( "" ); // start with nothing
blobtext = "";
timeout = 50; // give remote a short time to send a response. you might need to tune the timeout behavior.
While( timeout-- > 0,
rc = skt << recv( 10000 );
If(
rc[2] == "ok",
blob = blob || rc[3]; // recv always returns a blob, not text
Write( "\!nsome text received" ); // typically about three of these, ymmv
timeout = 50; // reset, still receiving ok
, // else
Starts With( rc[2], "CLOSED" ),
Break(); // done
, // else
Starts With( rc[2], "WOULDBLOCK" ), //
Write( "\!nwaiting..." ) // still fetching, maybe
, // else...what?
Show( rc );
Stop(); // that was unexpected
);
blobtext = Blob To Char( blob, encoding = "utf-8" );
If( timeout == 0,
Write( "\!nTimed out waiting for remote request" );
Stop();
);
Wait( .05 ); // give the OS some cycles to work with the incoming data
);
Show( Length( blob ) );
// JMP does not understand what the page claims: iso-8859-15
txt = blobToChar(blob,encoding="iso-8859-1"); length(txt);
f = saveTextFile("$temp/deleteme.html",txt);
open(f,htmltable(2))
Imported table
Craige