Javascript Failing To Receive Json From C When Uint32 Is A Multiple Of 256 Plus 10?
Solution 1:
This issue is due to Windows OS regarding its use of /r/n
instead of /n
for new line characters. This Chrome Developer link on native messaging, the last bullet, explains a bit and links to a Windows page that describes how to use _setmode()
to set stdout
to _O_BINARY
in the C code.
All that was required, was result = _setmode( _fileno( stdout ), _O_BINARY );
. It returns -1
if not successful.
Also, this SQLite forum response explains the cause in a little more detail.
The only reason I'm posting this as an answer rather than just adding it as additional information to my original question is that the last time I did that, somebody edited my question, removed the added information, and then closed the question. They'll probably remove this paragraph, at least, also.
Thanks to @user3386109 for pointing me in the right direction or I wouldn't have even known where to look for an answer.
Post a Comment for "Javascript Failing To Receive Json From C When Uint32 Is A Multiple Of 256 Plus 10?"