I am reading a file with xmlHttp
object and splitting the responseText
with newlines by split method.
But n character literally doesn't work. It acts like an error in my code and causes my code not even function.
Here is the line:
var lines=myPlaylist.responseText.split(n);
There is no error if I split the array myPlaylist with other characters.
Just n causes problem which I fail to understand.
At first, I thought the error was due to white-space:nowrap since I execute my code on Chrome.
Though I never used white-space in anywhere, I tried to set it to normal but it didn't work.
Similarly, I tried my code on other browsers (Firefox, IE etc), it didn't work either. Looks like I have a problem with using n. Is there any other way to use newline or error with my code?
And by the way, error seems to be a syntax error since it does not just ignore n character. Simply causes my code not to work
EDIT: An example responseText
[playlist]
File1=http://localhost:7000/Videos/Big%20Buck%20Bunny%20Trailer.ogv
Title1=Bunny Trailer
Length1=23
File2=http://localhost:7000/Videos/Dizzy%20Cat%20Video.ogv
Title2=Kedi
Length2=33
NumberOfEntries=2
Version=2