You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • I just tried:

    var aJS5 = {txt : "012345\nabcde\näöüß"};
    var saJS5 = E.toJS(aJS5);  
    //"{txt:\"012345\\nabcde\\n\\xE4\\xF6\\x­FC\\xDF\"}"
    var sa2JS5 =  E.toJS(saJS5);
    // "{txt:\"012345\\nabcde\\n\\xE4\\xF6\\xFC­\\xDF\"}"  // same
    var COMMAND = `transfer(${sa2JS5})\n`;
    // note I took the first 2 control chars out
    eval(COMMAND); // this work as-is
    
    // Exact code copied from your example that you say doesn't work
    transfer("{txt:\"012345\\nabcde\\n\\xE4\­\xF6\\xFC\\xDF\"}") // works fine
    
    >print(COMMAND);
    transfer("{txt:\"012345\\nabcde\\n\\xE4\­\xF6\\xFC\\xDF\"}")
    =undefined
    //copy and paste
    >transfer("{txt:\"012345\\nabcde\\n\\xE4­\\xF6\\xFC\\xDF\"}") // also works fine
    

    in the emulator

    So I don't really see what the problem is here?

    I guess there is maybe some problem with how you are sending this? It seems to me from your replace of \ with \\ that somehow you're trying to evaluate/parse the string one more times than was intended

About

Avatar for Gordon @Gordon started