I am using XMLHttpRequest responseText to GET a server txt file and load the contents of that file into an editable text box. The txt file contains short lines of letters separated by a new line. The user can chose which txt file to load and edit these lines before submitting the form. I need these new lines for the next step in processing the user inputs.
This works as expected in Chrome. In IE8 when the contents of txt file are loaded the editable text box looks like it is seperated by new lines but if I copy that newly loaded text and paste it into vim there are no \n or \r characters just space. If I manually copy and paste the contents of the .txt file into the IE8 text box the text is displayed properly and I can submit my form.
Chrome does not remove the return characters when loading the file. What is screwing up my text when loaded into IE? I can only see the difference between the text loaded in Chrome vs IE through vim.
Newline/LF translation will always give you headaches. Don’t judge the equivalence of your response text based on those characters.
If the rest of the data is the same, then it’s the same result for what it matters. If any of your code is dependent on these characters, change the code.