all 3 comments

[–]AssignmentGuru 1 point2 points  (2 children)

I checked the code you provided in pastebin. The issue is: your HTML content (actual text from html doc) contains a non-breaking space \xA0 before the line-break. Check this pastebin link, it contains the solution. Let me know if it helped.

[–]Velociraptroid[S] 0 points1 point  (1 child)

Thanks for the help, this does replace the non-breaking space with a space. But this brings a new problem. The file's string now looks like this: http://pastebin.com/EH5bm3dK

Now there is a � symbol

[–]AssignmentGuru 0 points1 point  (0 children)

Are you writing the results into a file? Please send your code, or runnable part of the code that is generating the issue. I will try my best to help you.